[plt-scheme] problem with example macro
Noticed this about the first macro given in
"Syntax-rules Primer for the Merely Eccentric" in the
Macro section of schematics:cookbook.
Hope it's not something I'm doing wrong.
Michael
(define-syntax nth-value
(syntax-rules ()
((nth-value n values-producing-form)
(call-with-values
(lambda () values-producing-form)
(lambda all-values
(list-ref all-values n))))))
=================================
Welcome to DrScheme, version 360.
Language: Swindle.
> (nth-value 3 '(a b c d e f))
. list-ref: index 3 too large for list: ((a b c d e
f))
>
____________________________________________________________________________________
Sponsored Link
Online or Campus degree Associate's, Bachelor's, or Master's
in less than one year.www.findtherightschool.com