We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isnothing
1 parent 397a684 commit 995a046Copy full SHA for 995a046
src/permutations.jl
@@ -23,14 +23,14 @@ end
23
# with the difference that we can also define `eltype(::Permutations)`, which is used in some tests.
24
25
function Base.iterate(p::Permutations, state=nothing)
26
- if isnothing(state)
+ if state === nothing
27
mp = multiset_permutations(eachindex(p.data), p.length)
28
it = iterate(mp)
29
- if isnothing(it) return nothing end
+ if it === nothing return nothing end
30
else
31
mp, mp_state = state
32
it = iterate(mp, mp_state)
33
34
end
35
indices, mp_state = it
36
return [p.data[i] for i in indices], (mp=mp, mp_state=mp_state)
0 commit comments