Search code examples
haskellsyntaxinfix-operator

what does forward slash mean in haskell?


I am learning Haskell, studying for a midterm. there is a test quiz I'm looking at at the moment with questions on type inference. some of the questions contain forward slashes and I have no idea what they represent. the goal is to determine the type of the function by looking at its variables. here are some examples of the questions im supposed to find the type of:

f1 x = (/x)

f3 x = (x/)

f5 = (1/)

f6 = (/2)

I have googled with no luck, what does the forward slash mean?


Solution

  • These are sections: the expression (/x) is equivalent to \y -> y / x and (x/) is equivalent to \y -> x / y.