kigubkur.construct.colon

Construct a Clojure vector for a given interval.

  • colon
(require '[kigubkur.construct [colon :refer [colon]]])

Examples

=> (colon [0 5])
[0.0 1.0 2.0 3.0 4.0 5.0]

=> (colon [0 5 0.5])
[0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0]

colon

(colon interval)

Creates Clojure vector for a given interval with step size (default is 1).

Interval: [start end] or optionally [start end step]