1 Jul
2010
1 Jul
'10
12:05 a.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.