Skip to content

Instantly share code, notes, and snippets.

@marianoguerra
Created April 7, 2012 03:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marianoguerra/2324776 to your computer and use it in GitHub Desktop.
Save marianoguerra/2324776 to your computer and use it in GitHub Desktop.
hello world 4
; 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