[racket-dev] actionable items, was: comments on "comments on learning Racket"
Time to move it to a place easy to find? But why a macro?
On Apr 28, 2014, at 1:10 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:
> On 04/28/2014 10:08 AM, Laurent wrote:
>> On Mon, Apr 28, 2014 at 3:47 PM, Matthias Felleisen
>> <matthias at ccs.neu.edu <mailto:matthias at ccs.neu.edu>> wrote:
>> [...]
>>
>> 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))))
>
> unstable/list has an unexported 'values->list' macro that takes an expression and returns the list of values it produces.
>
> Ryan
>
> _________________________
> Racket Developers list:
> http://lists.racket-lang.org/dev