adambard / adambard/learnxinyminutes-docs
[elm/en] Suggestions for improvement
- Dominant language
- Markdown
- Stars
- 12.3k
- Forks
- 3.7k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 6
Description
Sorry never made a PR, and sorry this will not be the first, hope you can manage anyway?
I liked this X in Y minutes as a good reference manual while trying to get the concepts of elm.
My suggestions on improving the text:
{-- Control flow --)
-- If statements always have a then and an else....
(-- Functions --}
I was trying this out in elm-REPL and it looks a little different there with the multi-line functions.
The REPL puts a | on the newline after you close the old line with a \
It will require you to make one whitespace after the |
(which I initially forgot and could not understand what was wrong)
As a non-native English speaker I really like how you explain how to "read" a script declaration.
List.map : (a -> b) -> List a -> List b
-- "List dot map has type a-goes-to-b, goes to list of a, goes to list of b."
However I understood that the last argument is the return, so would it not read "returns a list of b"?
At the union types you go a little too fast for me, putting two concepts in one example "type Intree"
Elsewhere I read an intermediate example, which made it somewhat more clear for me:
type User =
Anonymous | LoggedIn String
making clear that the union can be two things: a User not logged-in or when the user is logged-in his name string will be known. And then after that, there is the recursive concept...
import Dict
I am missing one option:
import Dict exposing (..)
this (..) was at first unclear to me what it meant, now I know it means everything in the module or library
Also beyond my understanding at this point is Signals and Tasks, it would be nice if you could at least name them?
You are free to ignore or use any of my suggestions, thanks for reading this anyway...
Lourens
Contributor guide
Assessment
This issue has not been assessed yet.