range   xtlang


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

Implementation

(bind-func range:[List{!a}*,!a,!a,!a]*
  (lambda (start end step)
    (if (<= step 0)
        (begin (println "Problem in call to range: step must be positive")
               null)
        (let ((val start)
              (result null))
          (while (< val end)
            (set! result (cons val result))
            (set! val (+ val step)))
          (reverse result)))))


Back to Index

Similar Entries

  • adrange    xtlang
  • adrange    xtlang
  • adrange    xtlang
  • limit-range    scheme
  • range    scheme
  • range    xtlang
  • range    xtlang
  • range    xtlang
  • range    xtlang
  • range    xtlang
  • range    xtlang
  • range    xtlang
  • range    xtlang
  • range-limit    scheme
  • range-limit    xtlang
  • range_limit    xtlang
  • range_limit    xtlang
  • set_range    xtlang
  • srange    xtlang