view final_pre/src/AgdaDebug.agda @ 7:28f900230c26

add final_pre
author ryokka
date Mon, 19 Feb 2018 23:32:24 +0900
parents
children
line wrap: on
line source

open import Level renaming (suc to succ ; zero to Zero )

module AgdaDebug where

open import stack

open import Relation.Binary.PropositionalEquality
open import Relation.Binary.Core
open import Data.Nat
open import Function


open SingleLinkedStack
open Stack

testStack07 : {m : Level } -> Maybe (Element ℕ)
testStack07 = pushSingleLinkedStack emptySingleLinkedStack 1 (\s -> pushSingleLinkedStack s 2 (\s -> top s))

testStack08 = pushSingleLinkedStack emptySingleLinkedStack 1
  $ \s -> pushSingleLinkedStack s 2
  $ \s -> pushSingleLinkedStack s 3
  $ \s -> pushSingleLinkedStack s 4
  $ \s -> pushSingleLinkedStack s 5
  $ \s -> top s


testStack10 = pushStack emptySingleLinkedStack 1
  $ \s -> pushStack 2
  $ \s -> pushStack 3
  $ \s -> pushStack 4
  $ \s -> pushStack 5
  $ \s -> top s