RosettaCodeData/Task/Conditional-structures/Ol/conditional-structures-7.ol
2023-07-01 13:44:08 -04:00

10 lines
230 B
Text

(define smart (case-lambda
((x)
(print x ", -, -"))
((x y)
(print x ", " y ", -"))
((x y z)
(print x ", " y ", " z))))
(smart 1) ; ==> 1, -, -
(smart 1 2) ; ==> 1, 2, -
(smart 1 2 3) ; ==> 1, 2, 3