
On 11/30/08 12:27, Luke Palmer wrote:
On Sun, Nov 30, 2008 at 11:04 AM, Larry Evans
wrote: The following post:
http://thread.gmane.org/gmane.comp.lib.boost.devel/182797
shows at least one person that would find it useful, at least in c++. Of course maybe it would be less useful in haskell.
The line:
typedef boost::mpl::vector
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 the expression.
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.
Luke
True, but if you look at the cross_nproduct_view template: {--cut here-- template < class Domains
struct
cross_nproduct_view
: fold
< Domains
, cross_product_one
, cross_product_view