diff options
author | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-19 21:17:49 +0200 |
---|---|---|
committer | Vladimir Azarov <avm@intermediate-node.net> | 2025-05-19 21:17:49 +0200 |
commit | b2d8dcd8673cfcdbf1e8a02aa19c53e42b8a60b6 (patch) | |
tree | 7de178aec8ebeacc7b4effe3b09de4485487da65 /common.sml | |
parent | 88378509521b46e615986f8c82d10b9da88830d2 (diff) |
Transition from exception-based errors to printf-based
Diffstat (limited to 'common.sml')
-rw-r--r-- | common.sml | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -36,6 +36,7 @@ structure Fold = struct fun step0 h (a, f) = fold (h a, f) fun step1 h (a, f) b = fold (h (b, a), f) fun step2 h (a, f) b c = fold (h (b, c, a), f) + fun step3 h (a, f) b c d = fold (h (b, c, d, a), f) end structure FRU = struct @@ -128,6 +129,8 @@ in (ifF ign (fn () => f output); (ign, output))) z fun A1 z = Fold.step2 (fn (f, v, (ign, output)) => (ifF ign (fn () => f (output, v)); (ign, output))) z + fun A2 z = Fold.step3 (fn (f, v1, v2, (ign, output)) => + (ifF ign (fn () => f (output, v1, v2)); (ign, output))) z end fun Ign z = Fold.step0 (fn (_, output) => (true, output)) z |