Created
April 7, 2012 03:14
-
-
Save marianoguerra/2324776 to your computer and use it in GitHub Desktop.
hello world 4
This file contains 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
; define a function to ask for a name | |
($define! ask-name ($lambda () | |
($sequence | |
(display "name? ") | |
(read-line)))) | |
; define a function to build the message | |
($define! build-message ($lambda (name) | |
(string-append "Hello " name "!\n"))) | |
; bind the input to a variable and build the message | |
($let* ((name (ask-name)) (message (build-message name))) | |
(display message)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment