monads
Using the Par monad with STM and Deterministic IO
I\'m in the process of writing a report for an assignment in which I implemented a concurrent multicore branch and bound algorithm using the STM package and there was an issue I\'ve come up against.[详细]
2023-04-13 05:59 分类:问答Automatic lifting of infix operators to monadic infix operators
One of the nice things about Haskell is the ability to use infix notation.开发者_运维知识库 1 : 2 : 3 : []:: Num a => [a][详细]
2023-04-12 08:00 分类:问答How do I handle an infinite list of IO objects in Haskell?
I\'m writing a program that reads from a list of files.The each file either contains a link to the next file or marks that it\'s the end of the chain.[详细]
2023-04-12 03:52 分类:问答How to evaluate IO Bools in Haskell
I\'m trying to write a function that takes an IO Bool and does stuff based on what this is, but I can\'t figure out how to evaluate the IO Bool. I tried saying do cond and do {cond==True} but got the[详细]
2023-04-10 12:07 分类:问答iSynaptic.Commons and the Maybe Monad
I\'ve been trying to figure out how I could use the Maybe monad in iSynaptic.Commons in a context where my value retriever could throw an exception:[详细]
2023-04-10 11:16 分类:问答Put two monadic values into a pair and return it
I am playing with Parsec and I want to combine two parsers into one with the result put in a pair, and then feed i开发者_C百科t another function to operate on the parse result to write something like[详细]
2023-04-08 17:33 分类:问答Nested Iteratees
I am working with a particular database where, upon a successful query, you are able to access a group of chunks of the resulting data using a[详细]
2023-04-07 12:51 分类:问答Using LINQ query syntax with custom Maybe monad implementation
I am trying to write a simple Maybe monad in C#. I want to be able to use the LINQ query syntax with it. This is what I have come up with so far:[详细]
2023-04-06 20:40 分类:问答avoid explicit passing of lookup table
In my very simple boolean expression toy program, I have the following evaluation function: eval\' :: Expr -> M.Map Char Bool -> 开发者_开发知识库Bool[详细]
2023-04-06 17:23 分类:问答Does a function like this already exist? (Or, what's a better name for this function?)
I\'ve written code with the following pattern several times recently, and was wondering if there was a shorter way to write it.[详细]
2023-04-06 14:42 分类:问答