为什么varx在这段代码中不是不变的?
y = { g = 'a' }
z = { g = 1 }
varx = foo y
varx = foo z
Run Code Online (Sandbox Code Playgroud)
有人知道吗 谢谢。
如何在Elm主模块中放置多行语句
例,
module Main exposing (main)
import Html exposing (text)
main =
text "1"
text "2"
Run Code Online (Sandbox Code Playgroud)
上面的方法不起作用,并给出此错误
Detected errors in 1 module.
-- TOO MANY ARGS -------------------------------------------------- src/Main.elm
The `text` function expects 1 argument, but it got 3 instead.
5|> text "1"
6| text "2"
Are there any missing commas? Or missing parentheses?
Run Code Online (Sandbox Code Playgroud)
放入括号和逗号没有帮助。
这个Elm示例的主要函数类型注释的含义是什么?
main : Html msg
main =
div [] [ text "1" ]
Run Code Online (Sandbox Code Playgroud)
HTML和味精是什么?