Basic question... I wish to map over a list and apply a function to each element, however I want to execute this from another function:
functionOne :: Int -> Int -> Int --Add x to each element of the list
functionOne element x = element + x
functionTwo :: [Int] -> (Int -> Int -> Int) -> [Int]
functionTwo list fOne = map list fOne ave --map list by applying functionOne with ave as x
where
ave = ((sum list) / length list)
Why isn't this working?