joergen7 / cuneiform-legacy

A Functional Workflow Language
Apache License 2.0
4 stars 0 forks source link

Enable currying #76

Open joergen7 opened 10 years ago

joergen7 commented 10 years ago

It should be possible to curry tasks.

Example:

deftask my-task( <out> : <a> <b> ) {
    out = a;
}

my-curried-task = curry( task: my-task b: 2 );

my-curried-task( a: 1 );

should evaluate to 1. As should

deftask my-task( out : a b )in bash *{
    out=$a
}*

my-curried-task = curry( task: my-task b: 2 );

my-curried-task( a: 1 );
joergen7 commented 10 years ago

The lambda expression that results from currying should always have a native prototype.