Haskell On compressing an array of int...

by sargon, April 16, 2009 06:08

_geil_

Took a moment befor...

55ca8e1248605bf5e1819ce2c47c160f Talk
import Data.List (group, mapAccumL)

compress :: [Int] -> [[Int]]
...

Haskell On compressing an array of int...

by bob, April 15, 2009 20:40 Star_fullStar_fullStar_fullStar_fullStar_full

oops i didn't read the orig...

D41d8cd98f00b204e9800998ecf8427e Talk

Haskell On compressing an array of int...

by Alec Leitner, April 15, 2009 18:37

Oh, I might have to learn H...

72820eaf703cd07ba9bc6ecc09e5d81a Talk
compress :: [Int] -> [(Int,Int)]
compress (l:ls) = reverse $ foldl (\ o@((c,i):cs) x -> if x == c + i then (c,i+1):cs else (x,1):o) [(l,1)] ls
compress [] = []

Haskell On compressing an array of int...

by sargon, April 15, 2009 17:48

"look and say sequence" has...

55ca8e1248605bf5e1819ce2c47c160f Talk
import Data.List (group)

compress :: [Int] -> [[Int]]
...

Haskell On compressing an array of int...

by bob, April 15, 2009 17:12 Star_fullStar_full

By the way your problem is ...

D41d8cd98f00b204e9800998ecf8427e Talk

Haskell On Tag

by Tj Holowaychuk, April 13, 2009 15:13

Ah I was wondering what thi...

F1e3ab214a976a39cfd713bc93deb10f Talk

Haskell On Tag

by sargon, April 13, 2009 09:54

arg,
in the instance of Sh...

D41d8cd98f00b204e9800998ecf8427e Talk
data Tag = Tag {
 tagType  :: String,
 tagAttrs :: [Attr]
...

Haskell On Tag

by sargon, April 13, 2009 09:51 Star_fullStar_fullStar_fullStar_fullStar_full

Using show instances for pr...

55ca8e1248605bf5e1819ce2c47c160f Talk

Haskell On Raytracer in haskell

by Tj Holowaychuk, April 10, 2009 23:12

Give me a few weeks to lear...

F1e3ab214a976a39cfd713bc93deb10f Talk

Haskell On Cat90

by Anders, March 13, 2009 02:07

I meant maxLength on line 5...

4f1a44133b6d68f9cd191c39aa7c986b Talk
import Data.List (transpose)

main = putStr . unlines . reverse . rotate . lines =<< getContents
...

Haskell On Cat90

by Anders, March 13, 2009 02:01

Data.List has a function 't...

4f1a44133b6d68f9cd191c39aa7c986b Talk
pivot ps = minimum ps
-- Or in the so-called point-free style:
-- pivot = minimum

Haskell On Graham scan

by Kunshan Wang, December 26, 2008 14:16

Your pivot function finds t...

Ee59cc6f674d495e835d48437aee8152 Talk
main = do s <- getContents
          putStr $ unlines $ reverse $ rotate $ lines s

...

Haskell On Cat90

by newacct, November 12, 2008 00:33
D41d8cd98f00b204e9800998ecf8427e Talk