parse-number-range

Public Domain

Parses LOOP's convenient "for-as-arithmetic" syntax into 5 simple values: from, to, limit-kind (:inclusive, :exclusive or nil if unbounded), by (step) and direction (+ or -)). Further related utilities are provided. Intended for easy implementation of analogous functionality in other constructs.

$ area51 add parse-number-rangeCopy

Usage

;; area51 add updates your .asd automatically.
;; Use the package in your code:
(in-package :my-project)
(parse-number-range:some-function ...)