Difference list #

This file provides a few results about DList, which is defined in Std.

A difference list is a function that, given a list, returns the original content of the difference list prepended to the given list. It is useful to represent elements of a given type as a₁ + ... + aₙ where + : α → α → α is any operation, without actually computing.

This structure supports O(1) append and push operations on lists, making it useful for append-heavy uses such as logging and pretty printing.

def Std.DList.lazy_ofList {α : Type u} (l : Thunk (List α)) :

Convert a lazily-evaluated List to a DList

Instances For
    theorem Std.DList.toList_empty {α : Type u} :
    Std.DList.toList Std.DList.empty = []
    theorem Std.DList.toList_append {α : Type u} (l₁ : Std.DList α) (l₂ : Std.DList α) :