impc:ir:gcnt   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/llvmir.xtm

Implementation

;; (impc:ir:gcnt [increment])
;; (impc:ir:gcnt) ;; get current cnt
;; (impc:ir:gcnt 2) ;; increment current cnt by 2
(define impc:ir:gcnt
  (let ((cnt 0))
    (lambda args
      (if (not (null? args))
          (set! cnt (+ (car args) cnt)))
      cnt)))


Back to Index