[racket-dev] actionable items, was: comments on "comments on learning Racket"
On Mon, Apr 28, 2014 at 3:47 PM, Matthias Felleisen <matthias at ccs.neu.edu>wrote:
> o Are you a student learning to program?
> o Are you an experienced programmer learning to use Racket?
>
(why "/learning/ to use Racket"? I could well be that s/he's on a new
machine)
Why not simply "Choose a language" and give a list of the usual ones with
explanations?
define (gather-return-values f . s)
> (call-with-values (lambda () (apply f s)) list))
>
Why not something like `apply->list` or `apply/list`?
(personally I usually call it `cvl` for call/values->list, but that's
because I often use it on the command line, which makes going from `(foo 'a
'b 'c)` to `(cvl foo 'a 'b 'c)` effortless)
> (define (nth-return-value i f . s)
> (call-with-values
> (lambda () (apply f s))
> (lambda l (list-ref l i))))
>
Forgot to mention that I've had less need for this one as once you have
`gather-return-values` it's easy enough to write `(second
(gather-return-values foo 'a 'b 'c))`.
Laurent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140428/45269579/attachment.html>