If the "string" $A \to B$ usually means the type of functions from $A$ to $B$ then what should the string $A\to ?$ mean?

31 Views Asked by At

Was thinking of a programming languages in which every string is a valid program.

What is the type of the string A->? or A-> where we used ? not to indicate a type but that any type could go there.

1

There are 1 best solutions below

0
On BEST ANSWER

It's a little unclear precisely what you're asking, but you can consider $A \to (-)$ to be a type constructor $* \to *$ that takes a type $B$ and maps it to the type $A \to B$. Here $*$ represents the kind of types. This is possible in type theories like System F$\omega$ and programming languages like Haskell.