From ce7411159d19b299a175beba1f75c606ffd2cfea Mon Sep 17 00:00:00 2001 From: Matthew Davidson Date: Wed, 4 Jan 2023 16:47:10 +0100 Subject: [PATCH] 26 --- src/koans/26_transducers.clj | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/koans/26_transducers.clj b/src/koans/26_transducers.clj index 4d8c2bb..eb52922 100644 --- a/src/koans/26_transducers.clj +++ b/src/koans/26_transducers.clj @@ -10,21 +10,21 @@ (meditations "A sequence operation with only one argument often returns a transducer" - (= __ + (= '(2 3 4) (sequence example-transducer [1 2 3])) "Consider that sequence operations can be composed as transducers" - (= __ + (= [2 4] (transduce transforms conj [1 2 3])) "We can do this eagerly" - (= __ + (= [2 4] (into [] transforms [1 2 3])) "Or lazily" - (= __ + (= '(2 4) (sequence transforms [1 2 3])) "The transduce function can combine mapping and reduction" - (= __ + (= 6 (transduce transforms + [1 2 3])))