#linked-lists in #Rust: pub struct List<T> {head: Link<T>} type Link<T> = Option<Rc<Node<T>>>; struct Node<T> {elem: T, next: Link<T>}
#moon-child’s implementation of parametrically polymorphic FP-persistent singly #linked-lists in #Rust with #[derive(Debug)] enum List<T> {Null, Cons(T,Arc<List<T>>)}, but you need to call .clone() on an Arc in order to share what it points to.