Skip to content

Instantly share code, notes, and snippets.

@marianoguerra
Created April 7, 2012 03:13
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/2324773 to your computer and use it in GitHub Desktop.
Save marianoguerra/2324773 to your computer and use it in GitHub Desktop.
hello world 3
; 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
($let ((name (ask-name)))
; build the message and bind it t a variable
($let ((message (build-message name)))
; display the message
(display message)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment