How to represent a double-ended linked list?

Given this definition, it might actually make sense to define it as

type 'a de_list = 'a list * 'a Bwd.t

I.e. the recently-announced ‘semantically backward list’ data type: [ANN] bwd 2.3.0 for backward lists

1 Like