Is it possible to create a cyclic doubly linked list with this type declaration ?
type 'a dlist = | Nil | Cons of 'a dlist Lazy.t * 'a * 'a dlist Lazy.t
This could fit for the creation of a singleton list
let singl v = let rec cell = Cons (lazy cell, v, lazy cell) in cell
But I can’t figure out how to cons an element to the list in O(1), as in singly-linked lists.