aboutsummaryrefslogtreecommitdiff
path: root/data/stack.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2019-03-18 18:25:25 +0100
committerHugo Hörnquist <hugo@lysator.liu.se>2019-03-18 18:25:25 +0100
commite41ade0f54d47ec3e07593f0763521aedc8ad390 (patch)
treeebc7cc7f7ea598b15b3d04728dd48767d597ed7f /data/stack.scm
parentGenerilified return, monads now truly functors. (diff)
downloadscheme-monad-e41ade0f54d47ec3e07593f0763521aedc8ad390.tar.gz
scheme-monad-e41ade0f54d47ec3e07593f0763521aedc8ad390.tar.xz
Assorted comments and cleanup.
Diffstat (limited to 'data/stack.scm')
-rw-r--r--data/stack.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/data/stack.scm b/data/stack.scm
index c28d648..d470394 100644
--- a/data/stack.scm
+++ b/data/stack.scm
@@ -1,4 +1,5 @@
(define-module (data stack)
+ #:export (pop peek push)
#:use-module (control monad)
#:use-module (control monad state))
@@ -6,6 +7,8 @@
;;; in action. These functions assume that they are in a
;;; (state list) monad. But dynamic types!
+;;; TODO test these for empty stack
+
(define (pop)
(do st <- (get)
let top = (car st)