aboutsummaryrefslogtreecommitdiff
path: root/src/example/test1.lang
blob: da3d3fa878c6e5bcaf16233f29af4d00797a2028 (plain)
1
2
3
4
5
6
7
8
9
(* 5 6)

(def (repeat n val)
  (if (<=' n 0)
    (#Nil [])
    (#Cons [val (repeat (-' n 1) val)])))

(repeat 5 5)