-
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
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 |
docs/tutorials/essential.juvix.md
Outdated
|
||
```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. |
@@ -738,14 +962,17 @@ dividePrice (n : Nat) (r : Resource) : Resource := | |||
}; | |||
``` | |||
|
|||
|
|||
## Common techniques |
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.
The edits in this section messed up the formatting of lists (some sublists not correctly indented) and Juvix code blocks (some moved to the very left, others remained indented as before). This needs to be fixed.
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.
huh! I didn't notice that.
Anyway, I think they are fixed now.
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.
No, it didn't work. The sublists are not indented. I don't know how to fix this other than removing the sublists.
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 removed the sublists. Tried to keep the headings as comments inside the code, but unfortunately Juvix markdown processing currently removes comments.
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.