@@ -387,17 +387,31 @@ struct ExponentsIterator{M,D<:Union{Nothing,Int},O}
387387 inline:: Bool
388388end
389389
390- function ExponentsIterator {M} (object; mindegree:: Int = 0 , maxdegree:: Union{Nothing,Int} = nothing , inline:: Bool = false ) where {M}
391- ExponentsIterator {M,typeof(maxdegree),typeof(object)} (object, mindegree, maxdegree, inline)
390+ function ExponentsIterator {M} (
391+ object;
392+ mindegree:: Int = 0 ,
393+ maxdegree:: Union{Nothing,Int} = nothing ,
394+ inline:: Bool = false ,
395+ ) where {M}
396+ return ExponentsIterator {M,typeof(maxdegree),typeof(object)} (
397+ object,
398+ mindegree,
399+ maxdegree,
400+ inline,
401+ )
392402end
393403
394404function ExponentsIterator (args... ; kws... )
395405 return ExponentsIterator {Graded{LexOrder}} (args... ; kws... )
396406end
397407
398408Base. eltype (:: Type{ExponentsIterator{M,D,O}} ) where {M,D,O} = O
399- Base. IteratorSize (:: Type{<:ExponentsIterator{M,Nothing}} ) where {M} = Base. IsInfinite ()
400- Base. IteratorSize (:: Type{<:ExponentsIterator{M,Int}} ) where {M} = Base. HasLength ()
409+ function Base. IteratorSize (:: Type{<:ExponentsIterator{M,Nothing}} ) where {M}
410+ return Base. IsInfinite ()
411+ end
412+ function Base. IteratorSize (:: Type{<:ExponentsIterator{M,Int}} ) where {M}
413+ return Base. HasLength ()
414+ end
401415
402416function Base. length (it:: ExponentsIterator{M,Int} ) where {M}
403417 len = binomial (nvariables (it) + it. maxdegree, nvariables (it))
@@ -412,7 +426,9 @@ nvariables(it::ExponentsIterator) = length(it.object)
412426_increase_degree (it:: ExponentsIterator{<:Graded,Nothing} , _) = false
413427_increase_degree (it:: ExponentsIterator{<:Graded,Int} , _) = false
414428_increase_degree (it:: ExponentsIterator{M,Nothing} , _) where {M} = true
415- _increase_degree (it:: ExponentsIterator{M,Int} , deg) where {M} = deg < it. maxdegree
429+ function _increase_degree (it:: ExponentsIterator{M,Int} , deg) where {M}
430+ return deg < it. maxdegree
431+ end
416432
417433# We just changed the degree by removing `Δ`,
418434# In graded ordering, we just add `Δ` to maintain the same degree
0 commit comments