Skip to content

Instantly share code, notes, and snippets.

@eu90h
Last active August 29, 2015 14:26
Show Gist options
  • Save eu90h/d3f1de3f72ad03f1be56 to your computer and use it in GitHub Desktop.
Save eu90h/d3f1de3f72ad03f1be56 to your computer and use it in GitHub Desktop.
the value of values
(define (f x y)
(list (add1 x) (add1 y)))
(define (g x y)
(values (add1 x) (add1 y)))
(define x 1)
(define y -1)
(let* ([values (f x y)]
[new-x (first values)]
[new-y (second values)])
...)
; compare with this
(define-values (new-x new-y) (g x y))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment