|
Boost Users : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-09-29 04:08:49
Kirit Sælensminde:
> template< typename R, typename V1, typename V2 >
> boost::function< boost::function< R ( V1 ) > ( V2 ) > curry(
> boost::function< R ( V1, V2 ) > f ) {
> return boost::bind( papply< R, V1, V2 >, f, _1 );
> }
...
> boost::function< boost::function< int ( int ) > ( boost::function< int
> ( int, int ) >, int ) > fpapply( papply< int, int, int > );
...
> //curry( fpapply );
Terrific.
It seems that fpapply is of the form function<R(V1)>(V2,V3), and curry wants
function<R(V1)>(V2).
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net