How to set default or optional parameters in scheme?
问题 I'm trying to figure out how to how to set default or optional parameters in Scheme. I've tried (define (func a #!optional b) (+ a b)) but I can't find of a way to check if b is a default parameter, because simply calling (func 1 2) will give the error: Error: +: number required, but got #("halt") [func, +] I've also tried (define (func a [b 0]) (+ a b)) but I get the following error: Error: execute: unbound symbol: "b" [func] If it helps I'm using BiwaScheme as used in repl.it 回答1: This