I feel like I'm overlooking something totally obvious here but what is the correct way (if any) to use point-free notation for composing a binary function and a unary function? For example, the following code compiles:
sortedAppend :: (Ord a) -> [a] -> [a] -> [a]
sortedAppend xs ys = sort $ xs ++ ys
but the following code does not compile:
sortedAppend :: (Ord a) -> [a] -> [a] -> [a]
sortedAppend = sort . (++)
Are we able to compose (++)
with sort
(in the order shown above)? If so, how?