Skip to content

Instantly share code, notes, and snippets.

View JoeyEremondi's full-sized avatar

Joey Eremondi JoeyEremondi

View GitHub Profile
@JoeyEremondi
JoeyEremondi / playground.rs
Created November 3, 2015 06:52 — forked from anonymous/playground.rs
Shared via Rust Playground
#[cfg(test)]
mod tests {
use std::rc::Rc;
// the `type` is not needed but it makes it easier if you will
// be using it in other function declarations.
type Adder = Fn(i32) -> i32;
fn sum(x: Rc<i32>) -> Rc<Adder> {