mirror of
https://github.com/chrisdone/duet.git
synced 2025-01-08 06:53:22 +03:00
Fixed fac
This commit is contained in:
parent
6f23223717
commit
a8c3bab394
@ -7,8 +7,8 @@ factorial = \n -> case n of
|
||||
go =
|
||||
\n acc ->
|
||||
case n of
|
||||
0 -> 1
|
||||
1 -> 1
|
||||
0 -> acc
|
||||
1 -> acc
|
||||
_ -> go (n - 1) (n * acc)
|
||||
|
||||
it = go 5 1
|
||||
it = go 3 1
|
||||
|
Loading…
Reference in New Issue
Block a user