Skip to content

Instantly share code, notes, and snippets.

Forked from btipling/
Last active December 26, 2015 20:52
What would you like to do?
fn main() {
fn map<F, T, A>(option: Option<T>, f: F)
-> Option<A>
where F: FnOnce(T) -> A {
match option {
None => None,
Some(value) => Some(f(value)),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment