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.
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.
Copyright © 2021 JogjaFile Inc.
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.