-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Review essential tutorial content #135
base: main
Are you sure you want to change the base?
Conversation
Success! The preview of this PR will be available at https://docs.juvix.org/pull-135/ in a few minutes. Please note that this link will be deleted when the PR is closed or merged. |
df0392a
to
9cb0426
Compare
Please revert line-break changes so that it is possible to see in the diff what was actually changed |
|
||
```juvix | ||
foo (pair : Pair Nat Nat) : Nat := | ||
let | ||
(x, y) := pair; | ||
bar := 42 + y; | ||
bar : Nat := 42 + y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was intentionally without type here, to show that you can omit it (and this is mentioned in the paragraph below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed, read the text after this code block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so why do you think the Nat
should be there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though you mentioned that those type annotations are permitted, I didn't see any example of that in the code examples. Maybe I missed something. I usually skim through the code examples; after that, I read the text if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is just above with myValue : Nat := ..
. True, not inside a let
, but the paragraph mentions that the syntax is exactly the same as for top-level definitions, and proceeds to demonstrate definition syntax not shown before.
Success! The preview of this PR will be available at https://docs.juvix.org/pull-135/ in a few minutes. Please note that this link will be deleted when the PR is closed or merged. |
8fb602f
to
260b32b
Compare
Co-authored-by: Łukasz Czajka <[email protected]>
Co-authored-by: Łukasz Czajka <[email protected]>
Co-authored-by: Łukasz Czajka <[email protected]>
Co-authored-by: Łukasz Czajka <[email protected]>
Co-authored-by: Łukasz Czajka <[email protected]>
Markdown formatting improvements and a few text refinements.