From c02207dbfebe55e29469e998b8178085f593bb63 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 9 Jan 2025 23:43:36 +0000 Subject: monads: Implement the state monad. * ravanan/work/monads.scm (): New record type. (state-bind, current-state, set-current-state, run-with-state): New public functions. (state-return, state-let*, state-begin): New public macros. * ravanan/command-line-tool.scm: Be selective to avoid importing run-with-state from (guix monads). * .dir-locals.el (scheme-mode): Indent state-let* correctly. --- .dir-locals.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.dir-locals.el') diff --git a/.dir-locals.el b/.dir-locals.el index 311e2f7..49094d8 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -12,4 +12,5 @@ (eval . (put 'call-with-current-directory 'scheme-indent-function 1)) (eval . (put 'call-with-inferior 'scheme-indent-function 1)) (eval . (put 'maybe-let* 'scheme-indent-function 1)) - (eval . (put 'maybe-assoc-set 'scheme-indent-function 1)))) + (eval . (put 'maybe-assoc-set 'scheme-indent-function 1)) + (eval . (put 'state-let* 'scheme-indent-function 1)))) -- cgit v1.2.3