Skip to content

Instantly share code, notes, and snippets.

View johncf's full-sized avatar

John Charankattu johncf

View GitHub Profile
@cstorey
cstorey / hkt-ptr.rs
Created August 12, 2016 10:55
Enough higher-kinded-ness to (trivially) abstract over pointer types in rust.
use std::ops::Deref;
use std::rc::Rc;
use std::sync::Arc;
trait Ptr<T> {
type PT : Deref<Target=T>;
fn build(val:T) -> Self::PT;
}
#[derive(Debug)]