This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
Tour description doesn't match tour code example #315
Open
Description
I was reading "A tour of Unison" and found this part:
Now put the following in your scratch file:
square : [Nat](https://share.unison-lang.org/latest/types/@@Nat) -> [Nat](https://share.unison-lang.org/latest/types/@@Nat)
square x =
use Nat *
x [*](https://share.unison-lang.org/latest/terms/@@Nat.*) x
This defines a function called
square
.It takes an argument called
x
and it returns
x
multiplied by itself.
The first line,
use .base
,tells Unison that you want to use short names for the base libraries in this file (which allows you to say
[Nat](https://share.unison-lang.org/latest/types/@@Nat)
instead of having to say
base.Nat
).
The lower text mentions use .base
, but that is not mentioned in the snippet.
Metadata
Assignees
Labels
No labels