skx / yal

Yet another lisp interpreter
GNU General Public License v2.0
16 stars 0 forks source link

Coerce arguments to functions, in some cases #144

Closed skx closed 7 months ago

skx commented 7 months ago

This is a bit of a sneaky change, but it is useful to convert arguments to lists in some cases:

This means:

(set! and (fn* (xs:list) ... )

Can then be called:

(and true false true true ..)

Because the arguments will be rewritten as if they were called:

(and (list true false true true ..)

This is general purpose, and applies to all functions.

I think it's a good idea, but we'll see.