Mercurial > hg > Papers > 2021 > soto-prosym
view Paper/src/AgdaStack.agda @ 14:393c839f987b default tip
DONE
author | soto <soto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 08 Jan 2022 12:41:39 +0900 |
parents | c59202657321 |
children |
line wrap: on
line source
data Element (a : Set) : Set where cons : a -> Maybe (Element a) -> Element a datum : {a : Set} -> Element a -> a datum (cons a _) = a next : {a : Set} -> Element a -> Maybe (Element a) next (cons _ n) = n record SingleLinkedStack (a : Set) : Set where field top : Maybe (Element a)