diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-18 18:25:25 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-18 18:25:25 +0100 |
commit | e41ade0f54d47ec3e07593f0763521aedc8ad390 (patch) | |
tree | ebc7cc7f7ea598b15b3d04728dd48767d597ed7f /data/stack.scm | |
parent | Generilified return, monads now truly functors. (diff) | |
download | scheme-monad-e41ade0f54d47ec3e07593f0763521aedc8ad390.tar.gz scheme-monad-e41ade0f54d47ec3e07593f0763521aedc8ad390.tar.xz |
Assorted comments and cleanup.
Diffstat (limited to 'data/stack.scm')
-rw-r--r-- | data/stack.scm | 3 |
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) |