python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Monadic compose with discarding (>>) flipped
The definition of (>>) function is following:
(>>) :: Monad m => m a -> m b -> m b
But I would like to achieve this function flipped like following:
I have a function tabulate :: ...

xbalaj
Votes: 0
Answers: 1
What is the idiomatic (and fast) way of treating the empty list/Seq as failure in a short-circuiting operation?
I have a situation where I am using functions to model rule applications, with each function returning the actions it would take when applied, or, if the rule cannot be applied, the empty list. I have...

amandasystems
Votes: 0
Answers: 1
CompletableFuture is a Monad. But where is the Applicative?
Java's CompletableFuture is a Monad given its methods thenCompose and thenApply, which
correspond to >>= (bind) and fmap in Haskell.
It is a well known fact that any Monad gives rise to an Appli...
michid
Votes: 0
Answers: 1
Binding a Maybe within another monad to avoid case stairway of doom?
I'm fetching a user from a database with a key I'm fetching from an api (uid). The uid is a Maybe ByteString, and so I can either case check whether it's a Maybe and then run the Redis monad, or someh...
staletidings
Votes: 0
Answers: 0