These are operations on haskell data.
You can view function signatures using Haskell :type
Types
Defined Functions
myfunction :: Int -> Int -> Int
myfunction x y = x+x + y*2Generic Type Functions
head :: [a] -> aAllows this function to work with any datatype and return that same datatype generic
Generic with Haskell Typeclass
square Num => a -> aHaskell Throwaway Arguments
implies :: Bool -> Bool -> Bool
-- throwaway second arg
implies False _ = True
implies True False = False
implies True True = True Haskell Rest of Arguments
-- call it repeatTwice'
repeatTwice' [] = []
-- first list element and then the rest of the list
repeatTwice' (x:xs) = x : x : repeatTwice' xs