haskell
How to Eliminate Cost-centres in String Taversals and List Comprehensions
I\'m implementing a motif finding algorithm from the domain of bioinformatics using Haskell. I wont go into the details of the algorithm other then to say it\'s branch and bound median string search.[详细]
2023-04-12 07:12 分类:问答Space analysis for parfib in monad-par example
When reading through parfib.hs code on github, I saw this comment about memory allocation for monadic version:[详细]
2023-04-12 07:08 分类:问答Mod Haskell Homework
My homework was to provide a function that computes \'x^y mod n\' -for any n < (sqrt maxint32) So I started by writing doing this:[详细]
2023-04-12 07:02 分类:问答Initialize the List of Record Syntax Data Type
I can initialize the list of Int such beautiful way: [2, 4 .. 20] And I 开发者_运维技巧am just wondering if there is any to initialize the list of my datatype in such manner.Something like this, b[详细]
2023-04-12 06:25 分类:问答Searching a tree while storing the path
type Pattern = [PatternPart] data Patt开发者_开发技巧ernPart = MatchTuple [PatternPart] | Named String |[详细]
2023-04-12 04:04 分类:问答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 分类:问答Converting a monadic function to an IO monadic function
parseSource :: String -> Either ParserError Mod.Module parseSource src = do (imports, rest) <- parseImports (Lex.lexSource src)[详细]
2023-04-12 01:30 分类:问答Writing [Bool] to binary file using Haskell
Working in Haskell, I am trying to write a big list of booleans to a binary file. I can write Word8 (which is a 8 bit word) to file, but can\'t figure out how to convert from an list of eight Bool t[详细]
2023-04-11 23:47 分类:问答Is there a better way to express this type?
I\'ve made this data type, which has a lot of repetition in it. data JobState = UnsanitizedData Handle[详细]
2023-04-11 21:51 分类:问答Total function of type (forall n . Maybe (f n)) -> Maybe (forall n . (f n))
Is it possible to write an injective function of type hard :: (forall n . Maybe (f n)) -> Maybe (forall n . (f n))[详细]
2023-04-11 21:41 分类:问答