Skip to content

Can higher order functions have generic types? #317

Answered by matiwinnetou
matiwinnetou asked this question in Q&A
Discussion options

You must be logged in to vote

This works:

hash_fn: fn(data) -> Hash<alg, a>,

but I would expect something like this:

hash_fn: fn(v: data) -> Hash<alg, a>,

because data is type not value...

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@KtorZ
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@rvcas
Comment options

Answer selected by matiwinnetou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants