adambard / adambard/learnxinyminutes-docs

[elm/en] Suggestions for improvement

未关闭
#2,133 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Markdown
星标
12.3k
派生
3.7k
平均合并
13 小时 10 分钟
30 天内合并 PR
6

描述

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

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。