import Data.List (group, mapAccumL) compress :: [Int] -> [[Int]] ...
Haskell On compressing an array of int...
by bob,
April 15, 2009 20:40
oops i didn't read the orig...
Haskell On compressing an array of int...
by Alec Leitner,
April 15, 2009 18:37
Oh, I might have to learn H...
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...
import Data.List (group) compress :: [Int] -> [[Int]] ...
Haskell On compressing an array of int...
by bob,
April 15, 2009 17:12
By the way your problem is ...
data Tag = Tag {
tagType :: String,
tagAttrs :: [Attr]
...
Haskell On Raytracer in haskell
by Tj Holowaychuk,
April 10, 2009 23:12
Give me a few weeks to lear...
import Data.List (transpose) main = putStr . unlines . reverse . rotate . lines =<< getContents ...
pivot ps = minimum ps -- Or in the so-called point-free style: -- pivot = minimum
main = do s <- getContents
putStr $ unlines $ reverse $ rotate $ lines s
...

_geil_
Took a moment befor...