abstract. You like it. It hits you. You don't have to read it. The work of art - sculpture or painting - forces your eye.” Clement Greenberg (1909 – 1994)
-> a -- Using recursion factorial n | n < 2 = 1 factorial n = n * factorial (n - 1) -- Using recursion, with guards factorial n | n < 2 = 1 | otherwise = n * factorial (n - 1) -- Using recursion but written without pattern matching factorial n = if n > 0 then n * factorial (n-1) else 1 -- Using a list factorial n = product [1..n] -- Using fold (implements product) factorial n = foldl (*) 1 [1..n] -- Point-free style factorial = foldr (*) 1 . enumFromTo 1 The art of coding “Let us change our traditional attitude to the construction of programs: Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.” Vikram Chandra Geek Sublime: The Beauty of Code, the Code of Beauty