2 ms·
> how would one annotate the type of that function Some languages support function overloads like Swift and Kotlin. fn foo(input: A, xform: A -> B) -> B
by hombre_fatal 8y ago
> how would one annotate the type of that function
Some languages support function overloads like Swift and Kotlin.
fn foo(input: A, xform: A -> B) -> B
fn foo(input: [A], xform: A -> B) -> [B]
Hmm, maybe we can generalize that into a Functor.