Boost logo

Boost :

Subject: Re: [boost] painless currying
From: Peter Dimov (pdimov_at_[hidden])
Date: 2011-08-24 17:17:37


Dave Abrahams wrote:

> I suppose the symmetrical non-lazy version looks like:
>
> f(x) => doesn't call f
> f(x)(y) => doesn't call f
> f(x)(y)(z) => doesn't call f
> f(x)(y)(z)() => calls f

This allows you to express bind( f, x, y, z ), which was impossible before,
but you've now lost the capability to express bind( f, x, y, _1 ), which
was.

bind( f, _1, y, z ), which is often needed in practice, is possible under
neither, which makes me view this whole exercise as somewhat academic.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk