tomhrr / dale

Lisp-flavoured C
BSD 3-Clause "New" or "Revised" License
1.02k stars 48 forks source link

mfor' doesn't evaluate the whole body #179

Closed porky11 closed 7 years ago

porky11 commented 7 years ago
(import stdlib)

(def main (fn extern-c void (void)
  (def sum (var auto int 0))
  (mfor' i (range 0 4)
    (printf "adding %i to sum\n" i)
    (setv sum (+ sum i)))
  (printf "now sum is %i\n" sum))) ;;sum still is 0
tomhrr commented 7 years ago

Thanks, this has been fixed.