Questions tagged [purescript]
PureScript is a Haskell-like language that compiles to JavaScript.
4 questions
1
vote
1
answer
103
views
PureScript breadth-first search implementation
For context, I wrote a function, get_servers, for the game Bitburner which is usually played by writing JavaScript code. Instead, I used PureScript to write the ...
1
vote
1
answer
95
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
3
answers
203
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 ...
5
votes
1
answer
474
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:
...