Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Data.Char
- import Data.List
- func = foldr (+) 0 . map (\x -> x * 10)
- func' xs = foldr (+) 0 $ map (\x -> x * 10) xs
- func'' xs = case map (\x -> x * 10) xs of
- [] -> 0
- x:xs -> x + foldr (+) 0 xs
- func''' xs = case (case xs of
- [] -> []
- x:xs -> (\x -> x * 10) x : map (\x -> x * 10) xs) of
- [] -> 0
- x:xs -> x + foldr (+) 0 xs
- func'''' xs = case xs of
- [] -> case [] of
- [] -> 0
- x:xs -> x + foldr (+) 0 xs
- x:xs -> case (\x -> x * 10) x : map (\x -> x * 10) xs of
- [] -> 0
- x:xs -> x + foldr (+) 0 xs
- func''''' xs = case xs of
- [] -> 0
- x:xs -> (\x -> x * 10) x + foldr (+) 0 (map (\x -> x * 10) xs)
- answer xs = case xs of
- [] -> 0
- x:xs -> (\x -> x * 10) x + answer xs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement