Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Haskell Homework Project

Name: Anonymous 2008-11-08 13:21

I has it!

That is all.

Name: Anonymous 2008-11-11 12:30

segment _ [] = []
segment max strs = seg : segment max rest where
    (seg,rest) = coll strs max
    coll [] _ = ([],[])
    coll (s:ss) left = let l = length s in
        if l <= left then let (a,b) = coll ss (left-l) in (s:a,b)
        else if left == max then ([s],ss)
        else ([],s:ss)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List