Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Olian04/gleam_recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
Olian04 committed Jul 31, 2024
2 parents 016e2bd + 0d70a69 commit 2d78984
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub fn main() {
io.debug(fac(10))
// Tail recursive factorial
let memo_fac = recursive.func(fn (it, res, f) {
let memo_fac = recursive.func2(fn (it, res, f) {
case it {
0 -> res
_ -> f(it - 1, res * it)
Expand All @@ -71,7 +71,7 @@ pub fn main() {
io.debug(fac(10, 1))
// Tail recursive fibonacci
let fib = recursive.func(fn (it, curr, prev, f) {
let fib = recursive.func3(fn (it, curr, prev, f) {
case it {
0 -> curr
_ -> f(it - 1, curr + prev, curr)
Expand Down

0 comments on commit 2d78984

Please sign in to comment.