Snipplr
http://snipplr.com/language/haskell/tags/algorithm
Recent snippets posted on Snipplr.comen-usSun, 22 Apr 2018 19:12:00 GMT(Haskell) Haskell 99 Problems, numbers 1 through 9 - rtperson
http://snipplr.com/view/58509/haskell-99-problems-numbers-1-through-9/
I had originally started these problems from #10 (Run-length encoding). I went back and did 1-8 for completeness. ]]>Thu, 08 Sep 2011 00:23:54 GMThttp://snipplr.com/view/58509/haskell-99-problems-numbers-1-through-9/(Haskell) Haskell 99 Problems - Number 20, Arrowed! - rtperson
http://snipplr.com/view/58144/haskell-99-problems--number-20--arrowed/
problem 20, (*) Remove the K'th element from a list
*Main> removeAt 1 "abcd"
"acd"
Trivial using a pure function. A bit more challenging if you use this problem to work up your Arrow-fu. ]]>Thu, 25 Aug 2011 01:54:30 GMThttp://snipplr.com/view/58144/haskell-99-problems--number-20--arrowed/(Haskell) Haskell 99 Problems - Solutions to 11 and 12 - rtperson
http://snipplr.com/view/57309/haskell-99-problems--solutions-to-11-and-12/
problem 11, modified run-length encoding
========================================
If an element has no duplicates, mark it as such.
Example:
encodeModified "aaaabccaadeeee"
[Multiple 4 'a',Single 'b',Multiple 2 'c',
Multiple 2 'a',Single 'd',Multiple 4 'e']
problem 12, Decode a run-length encoded list.
=============================================
Given a run-length code list generated as specified in problem 11. Construct its uncompressed version.
Example:
decodeModified
[Multiple 4 'a',Single 'b',Multiple 2 'c',
Multiple 2 'a',Single 'd',Multiple 4 'e']
"aaaabccaadeeee" ]]>Fri, 29 Jul 2011 08:03:55 GMThttp://snipplr.com/view/57309/haskell-99-problems--solutions-to-11-and-12/(Haskell) Run-Length Encoding in Haskell - rtperson
http://snipplr.com/view/57300/runlength-encoding-in-haskell/
Problem 10 of the famous 99 Problems. I got 99 problems, but a Lisp ain't one. ]]>Fri, 29 Jul 2011 06:08:49 GMThttp://snipplr.com/view/57300/runlength-encoding-in-haskell/