Skip to content

Commit

Permalink
extend section about TCO
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Mar 1, 2024
1 parent 6cb13b5 commit d917922
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/docs/scheme-intro/core.md
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,10 @@ This function is similar to previous recursive function, but note that loop is t
the result of loop don't need to wait on anything. This type of code is optimized by Scheme and can
recur any number of types.

If you need to create a recursive procedure that accumulate something, like create a list of create
a value, you need to add additional variable where you will old that value, the local variable is
ofen called result, but you can name it like you want.

## Loops
Recursion is not the only way to create loops in Scheme. You also have `do` syntax:

Expand Down

0 comments on commit d917922

Please sign in to comment.