diff options
author | Ludovic Courtès <ludo@gnu.org> | 2015-01-17 18:46:41 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2015-01-17 23:45:48 +0100 |
commit | 81a97734e04fa40412b2d44ccfae1b4796257648 (patch) | |
tree | dbb6513d891d778c41abe564891466c564721339 /emacs.am | |
parent | 5db3719153ccabd192eadaf99b14ad1149172c5b (diff) | |
download | guix-81a97734e04fa40412b2d44ccfae1b4796257648.tar guix-81a97734e04fa40412b2d44ccfae1b4796257648.tar.gz |
monads: Add the state monad.
* guix/monads.scm (state-return, state-bind, run-with-state,
current-state, set-current-state, state-push, state-pop): New
procedures.
(%state-monad): New variable.
* tests/monads.scm (%monads): Add %STATE-MONAD.
(%monad-run): Add 'run-with-state'.
(values->list): New macro.
("set-current-state", "state-push etc."): New tests.
Diffstat (limited to 'emacs.am')
0 files changed, 0 insertions, 0 deletions