python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Did this construction of free(freer?) monad works?
In the past 2 years, I was interested in using free monad to helping me to solve practical software engineering problem. And came up my own construction of free monad using some elementary category th...
yuxuanchiadm
Votes: 0
Answers: 1
The list monad is not a free monad but …
On page 12 of One Monad to Prove Them All, it is written that "a prominent example [of container] is the list data type. A list can be represented by the length of the list and a function mapping...
Bob
Votes: 0
Answers: 1
How to compose Free Monads
data Console a
= PutStrLn String a
| GetLine (String -> a)
deriving (Functor)
type ConsoleM = Free Console
runConsole :: Console (IO a) -> IO a
runConsole cmd =
case cmd of
(PutStr...
lunuy lunuy
Votes: 0
Answers: 1