[Haskell-cafe] Software Tools in Haskell

Benja Fallenstein benja.fallenstein at gmail.com
Wed Dec 12 20:20:53 EST 2007


Another version of detab:

main = interact $ perLine $ concat . snd. mapAccumL f 0 where
    f tab '\t' = (0, replicate (4-tab) ' ')
    f tab char = ((tab+1) `mod` 4, [char])

- Benja


More information about the Haskell-Cafe mailing list