adambard / adambard/learnxinyminutes-docs

[elm/en] Suggestions for improvement

Đang mở
#2,133 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Markdown
Star
12.3k
Fork
3.7k
Merge trung bình
13 giờ 10 phút
Pull request đã merge (30 ngày)
6

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.