Skip to content
This repository was archived by the owner on Aug 23, 2018. It is now read-only.
This repository was archived by the owner on Aug 23, 2018. It is now read-only.

Clarification on multi line input in README #152

@ohenecoker

Description

@ohenecoker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions