Skip to content

Commit

Permalink
use front and last instead of reimplementing inline
Browse files Browse the repository at this point in the history
Fixes #98
  • Loading branch information
nsajko committed Dec 16, 2023
1 parent 0791c83 commit 54e511e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/IterTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 54e511e

Please sign in to comment.