3 ms·
Wow, Purescript lets you define new operators and specify their type? (I assume infixl 1 is infix-left, what is the 1 for though) That is really cool. I wish H
by gavinray 7y ago
Wow, Purescript lets you define new operators and specify their type? (I assume infixl 1 is infix-left, what is the 1 for though)
That is really cool. I wish Haskell & Purescript weren't so difficult to grok, trying them has been on my todo-list for ages but they're so different than any other language.
- weavie 7y agoSure. You are basically specifying operators as aliases for functions, so all these are equivalent: F.applyFlipped blah rhubarb blah `F.applyFlipped` rhubarb blah |> rhubarb (|>) blah rhubarb The number (1) is the precedence, so if you have multiple operators in a statement it knows how to group them.