Skip to main content
Advice
0 votes
1 replies
74 views

Suppose a scenario where: you need to execute an expensive operation which can fail or succeed. the result of the operation is modeled by using a result object Result<T>. The result object ...
Enrico Massone's user avatar
0 votes
1 answer
88 views

The task Given the following string¹ one ' two 'three four the required function should split it in 3 tokens (one, two three, and four), in agreement with how the bash shell does: $ function ...
Enlico's user avatar
  • 30.2k
4 votes
1 answer
115 views

The following program assumes that /path/to/mypipe is a named pipe, e.g. created via mkfifo /path/to/mypipe, with no readers/writers waiting yet, runs two threads, of which the main thread keeps ...
Enlico's user avatar
  • 30.2k
3 votes
2 answers
102 views

If in a terminal I enter mkfifo /tmp/pipe echo hello > /tmp/pipe (which blocks) and in another I run the haskell program main = readFile "/tmp/foobar" >>= putStr then I see it ...
Enlico's user avatar
  • 30.2k
1 vote
2 answers
227 views

I’m working with large nested associative arrays in PHP and I need to apply transformations (like map, filter, reshape) immutably, meaning the original array should not be modified. The problem is ...
Dharm's user avatar
  • 21
0 votes
1 answer
58 views

I am having trouble getting the following code to work. I got it to work originally, then I changed it so all the Nonterminals also have positions. And I added the method parseLexeme that transforms ...
Jacob Bauer's user avatar
7 votes
2 answers
205 views

In Haskell in Depth, Chapter 11, there's an example aimed at avoiding character escaping in GHCi, which is what happens automatically when you enter print "ë", as it'll be printed like "...
Enlico's user avatar
  • 30.2k
0 votes
1 answer
85 views

I am a beginner to functional programming where most of my experience comes from Java/Kotlin. From my understanding functional programming has special names for certain function signatures. Type ->...
liampace's user avatar

15 30 50 per page
1
2 3 4 5
1283