I do not understand why this compiles
It's simply a function declaration declaring a
to be a function returning A
and taking one unnamed parameter of type B
.
It is valid because function declarations as opposed to function definitions are allowed within function definitions.
It's interpreted as the declaration of a function named a
, which takes one argument of type B
and returns A
.