3 ms·
For the record, this doesn't exist in PureScript by default (the default is the symbol `#`, which I don't find as pleasing on the eye). You need to define it:
by weavie 7y ago
For the record, this doesn't exist in PureScript by default (the default is the symbol `#`, which I don't find as pleasing on the eye). You need to define it:
import Data.Function as F
infixl 1 F.applyFlipped as |>
- gavinray 7y agoWow, 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.