TIL @rustlang simple fn ptr syntax:
fn foo(bar: & Fn(Baz) -> Bam) -> {}
Much simpler than making foo generic!
Replying to @coriolinus
note that this adds dynamic dispatch though; may or may not be what you want. Both have their place.
10:09 AM - 2 Aug 2016
0 replies
1 retweet
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.