From 81a97734e04fa40412b2d44ccfae1b4796257648 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 17 Jan 2015 18:46:41 +0100 Subject: 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. --- .dir-locals.el | 1 + 1 file changed, 1 insertion(+) (limited to '.dir-locals.el') diff --git a/.dir-locals.el b/.dir-locals.el index b099068dac..b82d0494e4 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -51,6 +51,7 @@ (eval . (put 'mlet* 'scheme-indent-function 2)) (eval . (put 'mlet 'scheme-indent-function 2)) (eval . (put 'run-with-store 'scheme-indent-function 1)) + (eval . (put 'run-with-state 'scheme-indent-function 1)) ;; Recognize '~', '+', and '$', as used for gexps, as quotation symbols. ;; This notably allows '(' in Paredit to not insert a space when the -- cgit 1.4.1