On Sun, Jun 21, 2015 at 7:36 PM, Matthias Felleisen
<matth...@ccs.neu.edu> wrote:
>
> I think the proper way of thinking Racket-y is to re-consider the input 
> representation:
>
> (define our-list '(("a" 1) ("b" 2.5) ("c" #t) ("d" "hi")))
> (string-join (map (match-lambda [`(,l ,v) (format "[~a=~a]" l v)]) our-list))
>
> You really want labels and values to be clearly paired, and the above 
> representation does that.
>

Absolutely -- the problem is ill-defined for flat lists with odd
lengths. (This is also a problem for `hash` and friends, which is why
I expressed doubt that it was a happy accident that `hash` also
happens to accept a flat list.) I was just assuming that the input
format was non-negotiable.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to