Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 348 Bytes

haskell.md

File metadata and controls

19 lines (16 loc) · 348 Bytes

Haskell

Function Declaration

challenge x y z = x + y + z

Logging

challenge s = unsafePerformIO $ do
    print $ (show $ x * y) ++ " " ++ (show $ y * z)
    return $ x + y + z

Count Items in Array

-- Counts numbers in `array` which are divisible by 3
sum [ 1 | n <- array, mod n 3 < 1 ]