Section of an infix operator
In Haskell there is a special syntax for partial application on infix operators. Essentially, you only give one of the arguments to the infix operator, and it represents a function which intuitively takes an argument and puts it on the "missing" side of the infix operator.
- (left section) is equivalent to(2^), or more verbosely(^) 2\x -> 2 ^ x
- (right section) is equivalent to(^2), or more verboselyflip (^) 2\x -> x ^ 2
- (unsugared:(1+)) is the "increment" function,(+) 1
- is the "double" function,(2*)
- is the "indent" function,('\t':)
- is the "is-capital-vowel-in-English" function (ignoring the "sometimes Y").(`elem` "AEIOU")