-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ch3 type annotation operator #214
Comments
About example x y z = foo + bar
where
foo = x * y
bar = y * z But in test/no-peeking/Solutions.purs ...
where
filterEntry :: Entry -> Boolean
filterEntry e = e.address.street == streetName
... Is it wrong? |
Thanks for the feedback.
We could should clarify this more by starting of with some examples of types and type annotations. Note that these type annotations are essentially the same as what you get in Elm and TypeScript (but we use two colons
It's a data constructor, so you can think of it as a function (but it also allows pattern matching too). In this case https://egghead.io/lessons/purescript-basic-data-constructors-in-purescript (examples would be helpful here):
Wow, good catch! That section on indentation needs to be updated. Indentation of |
When I read this paragraph:
I don't know the usage of "type annotation operator". So I search the internet and found this:
In the code example,
Nil
confused me. I don't know what isNil
in purescript. It doesn't look like a random function name. Is it a function?In JavaScript,
null
is a value:In Ruby,
nil
is a value:The text was updated successfully, but these errors were encountered: