Answers for "(:) in haskell"

0

haskell function

{-
  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)
Posted by: Guest on June-12-2021
-1

$ in haskell

take 1 $ filter even [1..10] 
-- = [2]

-- Same with:
take 1 (filter even [1..10])
Posted by: Guest on July-03-2021

Browse Popular Code Answers by Language