Questions tagged [purescript]

PureScript is a Haskell-like language that compiles to JavaScript.

Filter by
Sorted by
Tagged with
1
vote
1answer
45 views

Implement 'Foldable' on NonEmpty

Given: data NonEmpty a = NonEmpty a (Array a) I completed the following exercise from PureScript by Example: Write a Foldable instance for NonEmpty. Hint: ...
-6
votes
3answers
125 views

Refactor code to be more succinct but yet preserve the distinction of the `if` [closed]

the below code does what it needs to do. However I would like to know if there are better (shorter) ways to express the below while maintaining the explicitness of showing the decision like with the ...
3
votes
1answer
366 views

Maybe getting a character from a list of strings

I'm trying to transition from JavaScript to PureScript (a Haskell spinoff that transpiles to JavaScript). For starters I coded this: ...