nlfiedler / bakeneko

Scheme R7RS interpreter in Go
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Support arbitrary number of arguments #11

Closed nlfiedler closed 10 years ago

nlfiedler commented 11 years ago

Some procedures may take an arbitrary number of arguments (e.g. (list)). This should be done in the closure.Bind() function. If the closure.parameters field is an improper list (i.e. the last parameter label is preceded by a space-delimited period (.)) then after assigning the values to the preceding labels, the rest of the values are stored in a list and assigned to the last label.