Panicz Maciej Godek <godek.mac...@gmail.com> writes: > It is not a patch though, but just a separate module called (ice-9 > nice-9) that is meant to be placed in the "ice-9" directory (e.g. > "/usr/share/guile/2.0/ice-9"). > > It would definitely need a more elaborate documentation, but the quick > note is that it: > > * allows to destructure arguments to lambda, e.g. > > (map (lambda ((a . b)) (+ a b)) '((1 . 2)(3 . 4)(5 . 6))) > > * blends named-let with match-let and srfi-71-style let for multiple > values, legalizing usages like > > (let loop ((a (b c) (values 1 (list 2 3)))) > ... > (loop (values 4 (list 5 6))))
I only just recently noticed this message, but before people start writing a lot of code like this, I should warn you that in the procedure call (loop (values 4 (list 5 6))), by the semantics of Guile, that is supposed to be equivalent to (loop 4). If it does something else, that's probably a bug in our optimizer, and it might well act differently on our master branch already, because the multiple-values stuff has been cleaned up a lot compared with 2.0. Anyway, you certainly should not rely on this behavior. Sorry... Mark