Is there any possibility to create a function with variable but fixed number of arguments i.e. not a vararg function? I mean something like this.
(bind n 42)
(lambda (x_1, x_2, ..., x_n) (do_something x_1 x_2 ... x_3))
The only thing I know, which creates new functions with different argument count, is ‘curry’, but I don’t see how to iterate this principle.
Use
case-lambdain Scheme implementations that have it. It should be avialable with all r6rs implementations too. Also, some implementations have a way to define optional arguments, instead of the manual tweaking of a rest argument.