orbit   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/core/pattern-language.xtm

Implementation

;; if 3rd argument is present, that's the "default" case (when loop count
;; *isn't* congruent to 0 mod m)
(define orbit
  (lambda (loopcnt m val . args)
    (if (= 0 (modulo loopcnt m))
        val ;; return the value; this is the 'orbit' case
        (if (null? args) '_ (car args))) ;; return '_ (non-orbit case)
    ))


Back to Index