[racket-dev] flatten-begin

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Jul 17 23:17:18 EDT 2014

Why doesn't flatten-begin already do this?

Robby

On Friday, July 18, 2014, Asumu Takikawa <asumu at ccs.neu.edu> wrote:

> Hi all,
>
> I was wondering what people think about a potential API addition to the
> `syntax/flatten-begin` library.
>
> Something like `flatten-begin*` (or a less terrible name) that would
> recursively flatten `begin` expressions like the `flatten` function does
> for plain lists.
>
> i.e.,
>   (flatten-begin* #'(begin (begin 1 2) 3 4)) => (list #'1 #'2 #'3 #'4)
>
> as opposed to
>   (flatten-begin #'(begin (begin 1 2) 3 4))  => (list #'(begin 1 2) #'3
> #'4)
>
> Would that be useful? I keep finding myself writing functions like this.
>
> Cheers,
> Asumu
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140717/2e1a3c67/attachment.html>

Posted on the dev mailing list.