Merge branch 'veit/genericize-for' of https://github.com/hellerve/Carp into hellerve-veit/genericize-for

This commit is contained in:
Erik Svedäng 2020-02-14 10:44:29 +01:00
commit e6ebc5da13

View File

@ -143,12 +143,15 @@
(let [variable (car settings)
from (cadr settings)
to (caddr settings)
step (if (= (length settings) 4) (cadddr settings) 1)
step (if (> (length settings) 3) (cadddr settings) 1)
comp (if (> (length settings) 4)
(cadddr (cdr settings))
(if (< step (- step step)) '> '<))
]
(list
'let (array variable from)
(list
'while (list (if (< step (- step step)) '> '<) variable to)
'while (list comp variable to)
(list
'do
(if (= (length body) 0)