In Haskell I can write a multi-line statement on a single line, like
do {x<-[1,2];y<-[3,4];return (x,y)}
but in Purescript even a single-statement do-statement with curly braces will not compile. Is there different syntax to achieve this?
In Haskell I can write a multi-line statement on a single line, like
do {x<-[1,2];y<-[3,4];return (x,y)}
but in Purescript even a single-statement do-statement with curly braces will not compile. Is there different syntax to achieve this?
No, PureScript has no syntax for doing this kind of thing. Aside from just not using do
;)
[1, 2] >>= \x -> [3, 4] >>= \y -> pure (Tuple x y)