Factorial: Difference between revisions

Content added Content deleted
(Add Refal)
(→‎Soda: Tail recursive)
Line 9,744: Line 9,744:
===Tail recursive===
===Tail recursive===
<syntaxhighlight lang="soda">
<syntaxhighlight lang="soda">
@tailrec
_tailrec_fact (n : Int) (accum : Int) : Int =
_tailrec_fact (n : Int) (accum : Int) : Int =
if n < 2
if n < 2