summaryrefslogtreecommitdiff
path: root/bs/core.scm
diff options
context:
space:
mode:
Diffstat (limited to 'bs/core.scm')
-rw-r--r--bs/core.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/bs/core.scm b/bs/core.scm
index d8e0060..61ee8cc 100644
--- a/bs/core.scm
+++ b/bs/core.scm
@@ -148,6 +148,13 @@
[(_ (binding value) body ...)
(when binding body ...)]))
+;; range operator from http://www.mattknox.com/code.html
+(define (.. l h . s)
+ (let* ((step (if (null? s) 1 (car s))))
+ (if (> h l)
+ (range l h step)
+ (reverse (range h l step)))))
+
;; source utils