On Sat, Sep 17, 2011 at 1:43 PM, Jeremy Kun <[email protected]> wrote:
> Is there a function that converts a list into a values expression which
> contains every element of the list?

(define (list->values xs)
  (apply values xs))

> I've run into a bit of trouble trying to
> implement something like it myself, and it's probably because I don't
> understand exactly how values is used (or supposed to be used).
> My use case is essentially to make my web-server templating code shorter by
> using let*-values and calling a lookup table to return a bunch of strings
> corresponding to which page I want to serve.

Consider using 'match' on the lists (if I understand you correctly).

-Jon


> Jeremy
>
> _________________________________________________
>  For list-related administrative tasks:
>  http://lists.racket-lang.org/listinfo/users
>

_________________________________________________
  For list-related administrative tasks:
  http://lists.racket-lang.org/listinfo/users

Reply via email to