Skip to content

Commit

Permalink
Tutorial: remove comments about extra modules (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaszcz authored May 17, 2024
1 parent 23b4fe2 commit 5c6867c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions docs/tutorials/learn.juvix.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,6 @@ which is evaluated when running the program. The definition of `main` can have
any non-function type, e.g., `String`, `Bool` or `Nat`. The generated executable
prints the result of evaluating `main`.

All the examples we will showcase will be located in separate modules to
showcase all dependencies used explicitly. Note that all the formatted Juvix
code one sees in the tutorial is contained in one Juvix file with no imports.
Hence when we `open` a module without importing, this is due to the fact that
the opened module is already contained in the file.

## Data types and functions

To see the type of an expression, use the `:type` REPL command:
Expand Down Expand Up @@ -803,11 +797,6 @@ end;
So we have replaced stack allocation with heap allocation. This actually
decreases performance.

As a side-note, notice that we used the `hiding` option while declaring the use
of `Stdlib.Prelude`. This is due to the fact that the standard library already
has a function named `map`. Since names are absolute, we need to hide the name
in the standard library in order to define it in our module.

### Conclusion

- Use tail recursion to eliminate stack allocation.
Expand Down

0 comments on commit 5c6867c

Please sign in to comment.