mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-26 13:51:50 +03:00
Merge branch 'veit/genericize-for' of https://github.com/hellerve/Carp into hellerve-veit/genericize-for
This commit is contained in:
commit
e6ebc5da13
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user