Haskell Function

[Solved] Haskell Function | Haskell - Code Explorer | yomemimo.com
Question : haskell function

Answered by : al-arafat-tanin

{- One expression of the belief is “everything is a function” in Haskell. ... A recurring answer is that such things are “functions of no arguments” or functions of a one-element type or “constant functions”.
-}
-- A sample function
factorial :: (Integral a) => a -> a
factorial 0 = 1
factorial n = n * factorial (n - 1)

Source : | Last Update : Sat, 19 Jun 21

Answers related to haskell function

Code Explorer Popular Question For Haskell