Sections - why do I need backticks here?

Viewed 7124

I am trying to understand sections and think I have got it. Basically it is a way to apply partial application to binary operators. So I understand all the (2*), (+1), etc. examples just fine.

But in the O'Reilly Real World Haskell book, Sections 'section' :) it has this example:

(`elem` ['a'..'z']) 'f'
>True

I understand the need for the parentheses - ie the section syntax. But why do I need the backticks?

If I try, I get:

(elem ['a'..'z']) 'f'

<interactive>:220:19:
    Couldn't match expected type `[[Char]]' with actual type `Char'
    In the second argument of `elem', namely 'f'
    In the expression: (elem ['a' .. 'z']) 'f'
    In an equation for `it': it = (elem ['a' .. 'z']) 'f'
1 Answers
Related