
30 Jun
2010
30 Jun
'10
4:05 p.m.
Felipe Lessa schrieb:
main = interact $ unlines . map (show . (2^) . length . filter (`elem` "TDLF")) . lines
That's 70 non-whitespace characters. This one-liner is pretty readable, probably more than the Perl one ;D.
May I toss in: main = getLine >>= print . (2 ^) . length . filter (`elem` "TDLF")
main
(60 non-whitespace characters) C.