Сделал две такие функции :
prod:: [Integer] -> Integer
prod [] = 1
prod (num:list) = num * prod list
select:: [Integer] -> Integer -> ( Integer -> Integer -> Bool ) -> [Integer]
select list num oper = [x | x <- list, (oper) num x]
И когда хочу пременить prod . select [1..10] 5 (>) или
let fun = select [1..10] 5
prod . fun (>)
То вылетает такая ошибка:
error:
• Couldn't match expected type ‘a -> [Integer]’
with actual type ‘[Integer]’
• Possible cause: ‘fun’ is applied to too many arguments
In the second argument of ‘(.)’, namely ‘fun (>)’
In the expression: prod . fun (>)
In an equation for ‘it’: it = prod . fun (>)
• Relevant bindings include
it :: a -> Integer (bound at <interactive>:156:1)
Что не так ?