factorial :: Int -> Int
factorial n = go n 1 1
where
go :: Int -> Int -> Int -> Int
go n i r =
if i == n
then i * r
else go n (i + 1) (i * r)
--
You received this message because you are subscribed to the Google Groups "purescript" group.
To unsubscribe from this group and stop receiving emails from it, send an email to purescript+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/purescript.
For more options, visit https://groups.google.com/d/optout.