haskell
Haskell list comprehension 0's and 1's
I am trying to write a function row :: Int -> Int -开发者_如何学Go> [Int] row n v that returns a list of n integers, all 0\'s, except for the vth element, which needs to be a 1.[详细]
2023-04-11 09:09 分类:问答Comparison of enumerator vs. iteratee package
Currently, there two popular choices which implement the iteratee pa开发者_运维技巧ttern: The enumerator package and[详细]
2023-04-11 08:54 分类:问答Generating a lists of a specific length with Haskell's QuickCheck
-- 3 (find k\"th element of a li开发者_开发技巧st) element_at xs x = xs !! x prop_3a xs x = (x < length xs && x >= 0) ==> element_at xs (x::Int) == (xs !! x::Int)[详细]
2023-04-11 08:17 分类:问答parsing complicated jsons with Aeson
I\'m trying to parse a call to an API into a haskell record type using the Aeson Library I\'m using wikipedia pages, and parsing them to the title and a list of links.[详细]
2023-04-11 06:21 分类:问答Compiling ghc with -fPIC support
I\'m trying to install GHC with -fPIC support in Fedora. I\'ve grabbed a source tarball since it seems no binary one has this.[详细]
2023-04-11 06:05 分类:问答Haskell 32-bit program freezes on a 64-bit Windows
I\'m using the GHC to build a haskell pogram for Windows with help of a speciefic (Haskell-)Libr开发者_Python百科ary which is called citeproc-hs. On a 32Bit-Windows XP machine the application works ju[详细]
2023-04-11 05:23 分类:问答GHC 7.0.4 seems to have forgotten how to apply functors
In the \"Functors, Applicative Functors and Monoids\" chapter of Learn You A Haskell, Miran does the following:[详细]
2023-04-11 05:11 分类:问答What happens if an Enumerator tries to consume input?
The definition of Enumerator is: type Enumerator a m b = Step a m b -> Iteratee a m b The documentation states that while Iteratees comsume data, Enumerators produce it.I can understand how one[详细]
2023-04-11 03:35 分类:问答Grouping duplicates
Haskell gurus. Care to show me some more haskellian ways to perform this task that isn\'t restricted by my limited knowledge of haskell and FP in general?[详细]
2023-04-11 02:41 分类:问答How to simplify this expression?
Consider this: map fromEnum $ zipWith (==) \"aaaa\" \"abaa\" -- [1,0,1,1] It would be nice to have only one step here:[详细]
2023-04-11 02:39 分类:问答