From 54e511effad2939aebbbdaf73f1fe0ccaacd9e9b Mon Sep 17 00:00:00 2001 From: Neven Sajko Date: Sat, 16 Dec 2023 15:14:15 +0100 Subject: [PATCH] use `front` and `last` instead of reimplementing inline Fixes #98 --- src/IterTools.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IterTools.jl b/src/IterTools.jl index 216d4ee..84abf8e 100644 --- a/src/IterTools.jl +++ b/src/IterTools.jl @@ -595,7 +595,7 @@ subsets(xs::C, ::Val{K}) where {K, C} = StaticSizeBinomial{K, C}(xs) iterate(it::StaticSizeBinomial{0}, state=false) = state ? nothing : ((), true) # Generic case K >= 1 -pop(t::NTuple) = reverse(tail(reverse(t))), t[end] +pop(t::NTuple) = Base.front(t), last(t) function advance(it::StaticSizeBinomial{K}, idx) where {K} xs = it.xs