[chuck-users] wishlist for the new year

Hans Aberg haberg at math.su.se
Sun Jan 10 15:48:33 EST 2010

On 10 Jan 2010, at 19:59, mike clemow wrote:

> 1 => foo;
> this is sane, but this isn't:
> 1 => foo => bar;
> foo(1) is the same as 1 => foo
> foo => bar is the same as bar(foo)

When combining, one need to specify a binding order. Should it bind to  
the left, like say +:
   (1 => foo) => bar;
or to the right, as for example the assignment operator = in C/C++:
   1 => (foo => bar);
One can be the default, and the other can be invoked by the use of  

Such combinations are quite useful in C++ as "manipulators" of IO- 
streams. For example,
   chin => parser => value;
Here, the manipulator parser() could be a function that takes a chin  
as an argument, parsers it, and returns a value.


More information about the chuck-users mailing list