Mercurial > hg > Papers > 2017 > atton-master
view paper/src/AgdaStack.agda @ 104:0ab2de92120b teacher-submit
Added tag 1F-submit for changeset 0a4646310261
author | atton <atton@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 13 Feb 2017 10:33:15 +0900 |
parents | c0693ad89f04 |
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)