Elm Can';t将字典添加到Repl
如何使用换行符将其添加到replElm Can';t将字典添加到Repl,elm,Elm,如何使用换行符将其添加到repl import Dict fruit = Dict.fromList \ [ \ ((0,0), 'Apple') \ ,((0,1), ' ') \ ] 错误: > fruit = Dict.fromList \ | [ \ | ((0,0), 'Apple') \ | ,((0,1), ' ') \ -- SYNTAX PROBLEM -----------
import Dict
fruit = Dict.fromList \
[ \
((0,0), 'Apple') \
,((0,1), ' ') \
]
错误:
> fruit = Dict.fromList \
| [ \
| ((0,0), 'Apple') \
| ,((0,1), ' ') \
-- SYNTAX PROBLEM -------------------------------------------- repl-temp-000.elm
The = operator is reserved for defining variables. Maybe you want == instead? Or
maybe you are defining a variable, but there is whitespace before it?
5| fruit = Dict.fromList
在repl列表中添加换行符是不可能的吗?我不知道这是一种语言,但我想看看。这似乎有效:
import Dict
fruit = Dict.fromList \
[ \
((0,0), 'Apple') \
,((0,1), ' ') \
]
import Dict
fruit = Dict.fromList \
[ \
((0,0), "Apple") \
,((0,1), " ") \
]
在,((0,1),“”)\
我还需要双引号,这似乎是由
通过最小测试-如果包含尾随空格,则其行为与示例类似:
import Dict
fruit = Dict.fromList [ \
我不懂一种语言,但我想我会看看。这似乎有效:
import Dict
fruit = Dict.fromList \
[ \
((0,0), "Apple") \
,((0,1), " ") \
]
在,((0,1),“”)\
我还需要双引号,这似乎是由
通过最小测试-如果包含尾随空格,则其行为与示例类似:
import Dict
fruit = Dict.fromList [ \
嗯,我注意到我也不能有标签。我通常使用升华语法,出于某种原因,使用制表符而不是空格也会导致问题。嗯,我注意到我也不能使用制表符。我通常使用升华的语法,出于某种原因,使用制表符而不是空格也会导致问题