[Haskell-cafe] Mission: To take args from a list... generally

Joel Koerwer joelkoerwer at gmail.com
Wed Oct 4 04:45:48 EDT 2006


Thanks!

Don pointed me to Oleg's page too. I *was* (90%) convinced that this
is fundamentally different, but it sure looks similar. Kind of an
inside-out polyvariadic function. Any given f only takes n args, but
myApply doesn't know the value of n. In fact, a polyvariadic f would
cause an infinite loop. At least a stack overflow.

Always nice to know you're in good company though.

Cheers,
Joel

On 10/4/06, David House <dmhouse at gmail.com> wrote:
> Nice work! I haven't tried it out, but you seem to have on the right
> trick here: typeclass hackery. An interesting related exercise to
> develop a similar function using Template Haskell [1]. Also of note
> might be Oleg's writings on true polyvariadic functions [2].
>
> [1]: http://haskell.org/th
> [2]: http://okmij.org/ftp/Haskell/types.html#polyvar-fn


More information about the Haskell-Cafe mailing list