Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
In Data.Array the function array :: (IArray a e, Ix i) => (i, i) -> [(i, e)] -> a i e takes the array bounds and an association list, and it produces an Array.
-
I put together a skeleton module which should be usable for any of the problems in this year’s Google CodeJam Programming Contest (as long as they don’t adopt a new format/pattern for the problems this year).
-
EDIT: Don’t use this package, but use instead Data.List.Split by Brent Yorgey.
-
I came up with what I think is an elegant use of monadic code, while working on a program to compute solutions to the Postage Stamp Problem.
-
This is my third post investigating compression techniques related to the DEFLATE algorithm: the first on run-length encoding, and the second on simple Huffman Coding.
-
This is the second of probably three posts (the first was on run-length encoding in Haskell) inspired by Thomas Guest’s interesting article on the Deflate algorithm.
-
Just a quick implementation of a RLE algorithm for lists in haskell.
-
I thought this was a good, simple example of how currying and partial application can be used in a very expressive way.
-
In my boredom, I implemented the toy sorting algorithm called Gnome Sort.
-
I’ve released my first package, up now on hackage (haddock docs should be generated soon).
-
UPDATE: I’ve just released this as my first package on hackage.
-
I’m working on a module called DirectoryTree, a simple tree structure mirroring the structure of a directory tree in the outside world, with functions to hopefully make it easy to do useful things (I’m not sure if something like this already exists).
-
This is to wrap up my previous post about Tries and my attempts at an implementation, and to summarize some of the things I think I learned about implementing a Trie structure in Haskell.
-
I have been interested in writing a Trie implementation to see how its performance compares to using Data.Map for storing dictionary-like data.
-
The Algorithm We can use Brent’s Algorithm to detect infinitely-repeating sequences in a list of values generated by some iterated function: that is, any list in which the next value in the sequence is generated from the previous value alone; if we find d…
-
GHC has an extension to the list comprehensions syntax that replicates the functionality of zipWith, by allowing you to have two generators running in parallel.
-
Update 1/1/2012: this blog no longer uses wordpress.
-
infixr 9 .: (.:) :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c (.:) = (.)(.)(.)
-
A nice recursive algorithm for building a nearly-optimal binary search tree from an ordered list.: data Tree a = Node a (Tree a) (Tree a) | End The algorithm divides the input list into sublists of increasing length: 1,2,4,8… The first element
-
There are three identical functions in Data.Map for flattening a Map to a list of tuples in ascending order: assocs = toList = toAscList …but nothing to convert to a descending list.
-
This will be a blog about programming, mostly in the functional programming language Haskell.