range   scheme


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

Implementation

(define range
  (lambda args
    (cond ((= (length args) 1)
     (make-list-with-proc (car args)  (lambda (i) i)))
    ((= (length args) 2)
     (make-list-with-proc (- (cadr args) (car args)) (lambda (i) (+ (car args) i))))
    ((= (length args) 3)
     (make-list-with-proc (/ (- (cadr args) (car args)) (caddr args))
        (lambda (i) (+ (car args) (* i (caddr args))))))
    (else (println 'bad 'range!) '()))))


Back to Index

Similar Entries

  • adrange    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • adrange    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • adrange    xtlang    /digego/extempore/tree/v0.8.9/tests/core/algebraic_data_types.xtm
  • limit-range    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/libs/core/adt.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/libs/base/prelude.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/libs/base/prelude.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/libs/base/prelude.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • range    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/algebraic_data_types.xtm
  • range-limit    scheme    /digego/extempore/tree/v0.8.9/runtime/scheme.xtm
  • range-limit    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm
  • range_limit    xtlang    /digego/extempore/tree/v0.8.9/libs/core/vaudio_dsp.xtm
  • range_limit    xtlang    /digego/extempore/tree/v0.8.9/examples/contrib/fluids_2d.xtm
  • set_range    xtlang    /digego/extempore/tree/v0.8.9/libs/contrib/TSM_library.xtm
  • srange    xtlang    /digego/extempore/tree/v0.8.9/examples/core/audio_streams.xtm