From 7bfc78b122ad9cbb65eed16f7de4d4021547c2a8 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 23 Mar 2024 19:18:16 +0100 Subject: Some Project Euler solutions --- std/Monad.bruijn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'std/Monad.bruijn') diff --git a/std/Monad.bruijn b/std/Monad.bruijn index 97291eb..0dae29e 100644 --- a/std/Monad.bruijn +++ b/std/Monad.bruijn @@ -37,6 +37,9 @@ sequence foldr (lift-m2 cons) {}empty ⧗ (List (M a)) → (M (List a)) >‣ [sequence ∘∘ 0] +# traverses list based on modifier +traverse sequence ∘∘ map ⧗ (a → (M b)) → (N a) → (M (N b)) + # performs action n times replicate-m >replicate ⧗ Number → (M a) → (M (List a)) -- cgit v1.2.3