#!/usr/bin/env runhaskell main = mapM_ (putStrLn . f) [2, 0, 1, 7] f lis = foldl1 (\y x -> y*10 + x) lis