You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.
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.
The text was updated successfully, but these errors were encountered:
It looks like a later snippet does use .base so I think it's just maybe a bit out of order(?)
A few paragraphs later I similarly see "Notice that Unison inserts precise use statements when rendering your code." just after a snippet that doesn't have any "use" statements.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I was reading "A tour of Unison" and found this part:
The lower text mentions
use .base
, but that is not mentioned in the snippet.The text was updated successfully, but these errors were encountered: