I am new to elm and currently exploring the elm syntax through the repl. Until recently, every time I attempted to write a multi line input in the repl I like this:
sqr num = \
num * num
I would get this error:
"The = operator is reserved for defining variables. Maybe you want == instead? Or
maybe you are defining a variable, but there is whitespace before it?"
I'm on a mac running macOS 10.12.3 running Elm 0.18.0
This was pretty annoying because I thought I was following the README instructions and it didn't make sense that I was still getting this error. After digging through the web for I while, I found that all I needed was a space after the second line for example:
sqr num = \
| num * num
The second space before the body of the function is super critical and space before all other consecutive lines. For the sake of beginners who wouldn't know this off the bat, could someone please include that in the README? Newcomers would find it very helpful. Thanks
I am new to elm and currently exploring the elm syntax through the repl. Until recently, every time I attempted to write a multi line input in the repl I like this:
I would get this error:
I'm on a mac running macOS 10.12.3 running Elm 0.18.0
This was pretty annoying because I thought I was following the README instructions and it didn't make sense that I was still getting this error. After digging through the web for I while, I found that all I needed was a space after the second line for example:
The second space before the body of the function is super critical and space before all other consecutive lines. For the sake of beginners who wouldn't know this off the bat, could someone please include that in the README? Newcomers would find it very helpful. Thanks