# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # -u Adhoc2.foo === module Adhoc2 where main :: IO () -main = print $ foo (bar [1..10]) +main = print $ bar [1..10] - 2 foo :: Int -> Int foo x = x - 2 bar :: [Int] -> Int -bar ys = length (filter even zs) +bar ys = count even zs where - zs = map (+1) (map (*3) ys) + zs = map ((+1) . (*3)) ys