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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
1 data Element (a : Set) : Set where
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
2 cons : a @$\rightarrow$@ Maybe (Element a) @$\rightarrow$@ Element a
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
3
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
4 datum : {a : Set} @$\rightarrow$@ Element a @$\rightarrow$@ a
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
5 datum (cons a _) = a
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
6
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
7 next : {a : Set} @$\rightarrow$@ Element a @$\rightarrow$@ Maybe (Element a)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
8 next (cons _ n) = n
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
9
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
10 record SingleLinkedStack (a : Set) : Set where
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
11 field
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
12 top : Maybe (Element a)
959f4b34d6f4 add final thesis
soto
parents:
diff changeset
13