Adds samples for the clean programming language

This commit is contained in:
Joshua Moerman
2014-10-05 12:55:00 +02:00
parent 5010f32421
commit bec0052065
9 changed files with 304 additions and 0 deletions

14
samples/Clean/stack.dcl Normal file
View File

@@ -0,0 +1,14 @@
definition module stack
:: Stack a
newStack :: (Stack a)
push :: a (Stack a) -> Stack a
pushes :: [a] (Stack a) -> Stack a
pop :: (Stack a) -> Stack a
popn :: Int (Stack a) -> Stack a
top :: (Stack a) -> a
topn :: Int (Stack a) -> [a]
elements :: (Stack a) -> [a]
count :: (Stack a) -> Int