From fc41ef1eb9aa78fba674f2a0394ceb0afe0d7f34 Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Fri, 27 Mar 2026 13:54:00 +0100 Subject: [PATCH] make `imap` an alias for `Iterators.map` Fixes #123 --- src/IterTools.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/IterTools.jl b/src/IterTools.jl index 8499fa6..bf3b355 100644 --- a/src/IterTools.jl +++ b/src/IterTools.jl @@ -446,6 +446,8 @@ Iterate over values of a function applied to successive values from one or more Like `Iterators.zip`, the iterator is done when any of the input iterators have been exhausted. +Alias for `Iterators.map`. + ```jldoctest julia> for i in imap(+, [1,2,3], [4,5,6]) @show i @@ -455,7 +457,7 @@ i = 7 i = 9 ``` """ -imap(mapfunc, it1, its...) = (mapfunc(xs...) for xs in zip(it1, its...)) +const imap = Iterators.map # Iterate over all subsets of an indexable collection