← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 121
  1. 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.

  2. Some Haskell Boilerplate For Google CodeJam

    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).

  3. List Grouping module released

    EDIT: Don’t use this package, but use instead Data.List.Split by Brent Yorgey.

  4. 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.

  5. Fun with Lazy Arrays: the LZ77 Algorithm

    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.

  6. 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.

  7. Run-length Encoding

    Just a quick implementation of a RLE algorithm for lists in haskell.

  8. I thought this was a good, simple example of how currying and partial application can be used in a very expressive way.

  9. Gnome Sort

    In my boredom, I implemented the toy sorting algorithm called Gnome Sort.

  10. directory-tree module released

    I’ve released my first package, up now on hackage (haddock docs should be generated soon).

  11. a DirectoryTree module and some examples

    UPDATE: I’ve just released this as my first package on hackage.

  12. Why I love Hoogle

    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).

  13. Initial tests of Tries: Follow Up

    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.

  14. Some initial tests of Tries

    I have been interested in writing a Trie implementation to see how its performance compares to using Data.Map for storing dictionary-like data.

  15. Cycle Detection

    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…

  16. 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.

  17. Update 1/1/2012: this blog no longer uses wordpress.

  18. The Total Recall combinator

    infixr 9 .: (.:) :: (b -> c) -> (a -> a1 -> b) -> a -> a1 -> c (.:) = (.)(.)(.)

  19. Building a Tree from an Ordered List

    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

  20. Data.Map Conversion Functionality

    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.

  21. "Hello world!" :: String

    This will be a blog about programming, mostly in the functional programming language Haskell.