use define*: (define* (modl list1 (n 12)) (loop for x in list1 collect (mod x n)))
best, johannes Am 02.01.2012 um 22:22 schrieb Michael Winkler: > hi list > > I'm struggling with optional and default arguments: How can I do this > lisp code in schme common music? > > (defun modl (list1 &optional (n 12)) > (loop for x in list1 collect (mod x n))) > > examples: > (modl '(10 12 14)) >>> (10 0 2) > (modl '(10 12 14) 5) >>> (0 2 4) > > thankx and a happy new year > Michael > > _______________________________________________ > Cmdist mailing list > [email protected] > http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist _______________________________________________ Cmdist mailing list [email protected] http://ccrma-mail.stanford.edu/mailman/listinfo/cmdist
