Currying Tensors


There is an interesting parallel between currying and tensors.

In programming languages like Haskell, functions of several arguments are "curried" into higher-order functions of successive arguments.

For example, if a function "add" takes two integers and returns an integer, it can be viewed as a function that takes one integer and returns a function that takes one integer and returns an integer.

add :: Int -> Int -> Int

Now, a covector is a function that takes a vector and returns a real. In other words:

Vector -> Real

So it is easy to see that if you curry a tensor of rank (0,2) you get:

Vector -> Vector -> Real

In other words, a tensor of rank (0,2) is a function from a vector to a covector.