From 0c0fb4dc26fd24d91fdc3e8586216af68817b776 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 20 Jun 2026 10:49:04 +0100 Subject: monads: Bind result and value in sequence in the right order. --- ravanan/work/monads.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ravanan/work/monads.scm b/ravanan/work/monads.scm index 7fd7e79..a536ee8 100644 --- a/ravanan/work/monads.scm +++ b/ravanan/work/monads.scm @@ -81,8 +81,8 @@ of values." (let ((return (monad-return monad-type))) (mlet* monad-type ((reverse-list (fold (lambda (mvalue mresult) - (mlet* monad-type ((value mvalue) - (result mresult)) + (mlet* monad-type ((result mresult) + (value mvalue)) (return (cons value result)))) (return (list)) mvalues))) -- cgit 1.4.1