diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-18 21:57:47 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-18 21:57:47 +0100 |
commit | b4ac0fa66a3212fad3373a68d84d4b74c5fd309c (patch) | |
tree | aecf6d89f36849e5efb999315c38d572cbbed48e /monad/stack.scm | |
parent | Remove entire examples directory. (diff) | |
download | scheme-monad-b4ac0fa66a3212fad3373a68d84d4b74c5fd309c.tar.gz scheme-monad-b4ac0fa66a3212fad3373a68d84d4b74c5fd309c.tar.xz |
Wrote a bunch of documentation.
Diffstat (limited to 'monad/stack.scm')
-rw-r--r-- | monad/stack.scm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/monad/stack.scm b/monad/stack.scm index 8d25303..fee48a6 100644 --- a/monad/stack.scm +++ b/monad/stack.scm @@ -1,14 +1,15 @@ +;;; Commentary: +;; Simple stateful stack module for showing the state monad +;; in action. These functions assume that they are in a +;; (state list) monad. But dynamic types! +;; +;; TODO test these for empty stack +;;; Code: (define-module (monad stack) #:export (pop peek push) #:use-module (monad) #:use-module (monad state)) -;;; Simple stateful stack module for showing the state monad -;;; 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) |