Skip to content

Instantly share code, notes, and snippets.

@jbclements
Last active December 14, 2015 22:19
Show Gist options
  • Save jbclements/5158000 to your computer and use it in GitHub Desktop.
Save jbclements/5158000 to your computer and use it in GitHub Desktop.
string matching with number conversion
#lang racket
(define lines
(list "hootehutt 23 hoethoet 4"
"abc 9 thuoteh 9"))
(for/list ([l lines])
(match-define (list name age lastname donuts) (string-split l))
(list name (string->number age) lastname (string->number donuts)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment