`fun <G : Applicative<*>, A, B> traver...
# announcements
p
fun <G : Applicative<*>, A, B> traverse(fa: HK<F, A>): (f: (A) -> HK<G, B>) -> HK<G, HK<F, B>>
is this valid syntax? that f name looks out of place, yet it compiles
k
It should be valid. for a function declaration, it goes
"fun" ... ":" type
, where
type
then is
modifier typeReference
, where in your case
typeReference
matches
functionType
, where the
"("parameter{","}?")"
has the
parameter
simply matching
SimpleName : type
. So the
f
in which case would be the
SimpleName
Although I am not very sure of what the significance of this type name is
p
Yes, being at type position. It’s a weird looking currying. Thanks!
🙂 1