src/containers/types/queue.bend

bend-collections-laws-containers@1.0.0.0 · 19 lines · 0 definitions

1import Base
2
3# Neutral datatypes shared by src/queue.bend and spec/queue.bend.
4
5type Error is Data:
6  EmptyQueue{}
7
8type Op<-T: Data> is Data:
9  Length{}
10  Enqueue{value: T}
11  Dequeue{}
12  Peek{}
13  ToList{}
14
15type Obs<-T: Data> is Data:
16  ONat{value: Nat}
17  OItem{result: Result<&2, &2, Error, T>}
18  OUnit{}
19  OList{items: List<&2, T>}