(cond ((test-1) (expression-1)))
When i use a cond, can i give the several functions in (expression-1)?
Like this:
(cond ((= 1 1) ((fun1) (fun2)) )
The begin is actually optional -- cond (in Scheme as well as in Emacs Lisp, at least) take multiple expressions after each test expression and evaluate them in turn in an implicit begin
(cond ((= 1 1) (fun1 ...) (fun2 ...))
(t (something-else)))
Use #t instead of t for Scheme
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With