Mercurial > hg > Papers > 2021 > soto-thesis
annotate paper/src/AgdaStack.agda.replaced @ 14:a63df15c9afc default tip
DONE
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 15 Feb 2021 23:36:39 +0900 |
parents | 959f4b34d6f4 |
children |
rev | line source |
---|---|
3 | 1 data Element (a : Set) : Set where |
2 cons : a @$\rightarrow$@ Maybe (Element a) @$\rightarrow$@ Element a | |
3 | |
4 datum : {a : Set} @$\rightarrow$@ Element a @$\rightarrow$@ a | |
5 datum (cons a _) = a | |
6 | |
7 next : {a : Set} @$\rightarrow$@ Element a @$\rightarrow$@ Maybe (Element a) | |
8 next (cons _ n) = n | |
9 | |
10 record SingleLinkedStack (a : Set) : Set where | |
11 field | |
12 top : Maybe (Element a) | |
13 |