mwatts15 / Crono

Scheme project for CS345
0 stars 0 forks source link

Preload list combinators into the environment #5

Open mwatts15 opened 11 years ago

cvidal commented 11 years ago

Once combinators are added, list combinators are trivial to implement. I'll take this one.

cvidal commented 11 years ago

Didn't progress on this issue before since currying didn't work completely at the time. If that works now, this should be pretty simple. Issue #22 should be equally simple.

tvarney commented 11 years ago

Currying is implemented on the master branch. The interpreter will perform substitution of arguments when they are supplied, but will not attempt to reduce the function in any way. You can see the results by giving the interpreter any incomplete function; for example:

(+ 3)

results in the partial function:

(\ (_i?0!_) (+ 3 _i?0!_))

The messy _i?0!_ thing is the automatic variable name. I went for needlessly complex and messy to reduce name conflicts with lambdas, since a lambda can define variable names like that.