[Haskell-cafe] Re: howto tuple fold to do n-ary cross product?
lrpalmer at gmail.com
Sun Nov 30 13:27:40 EST 2008
On Sun, Nov 30, 2008 at 11:04 AM, Larry Evans <cppljevans at suddenlink.net> wrote:
> The following post:
> shows at least one person that would find it useful, at least in
> c++. Of course maybe it would be less useful in haskell.
typedef boost::mpl::vector <T1Variants, T2Variants, T3Variants> TT;
Has the number of lists hard-coded as 3, and does not abstract over
it. This corresponds to the "3" in "liftA3", or the number of <*>s in
Abstracting over the number and types of arguments is something
neither C++ nor Haskell is very good at. But in order to be able to
do any abstraction using such a variable-argument function, the type
systems of these languages would have to increase in complexity by
quite a lot.
More information about the Haskell-Cafe