Last active
December 14, 2015 22:19
-
-
Save jbclements/5158000 to your computer and use it in GitHub Desktop.
string matching with number conversion
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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