Skip to content

Recur

Name - Description Default Type
<input> Any
<output> Any

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
(defwire fibo
   >= .n
   (If (IsLess 2)
       :Then (-> (Pass))
       :Else (-> .n (Math.Subtract 2) (Recur) >= .a
                 .n (Math.Subtract 1) (Recur) >= .b
                 .a (Math.Add .b))))

16 (Do fibo)
(Log)
(Assert.Is 987 true)
[info] [shards/General/Recur/Recur.edn] 987