From 5e88a35761c5f77985157213e54e992b3e7ec298 Mon Sep 17 00:00:00 2001 From: Antonio Menezes Leitao Date: Mon, 25 Mar 2024 17:14:32 +0000 Subject: [PATCH] Added type. --- src/Utils.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils.jl b/src/Utils.jl index 413e689..bf0a9c7 100644 --- a/src/Utils.jl +++ b/src/Utils.jl @@ -261,7 +261,7 @@ list(gen::Base.Generator) = head(x::Cons{T}) where {T} = x.head::T tail(x::Cons{T}) where {T} = x.tail Base.first(x::Cons) = x.head -Base.Iterators.drop(x::Cons, n) = n == 0 ? x : drop(x.tail, n-1) +Base.Iterators.drop(x::Cons, n::Integer) = n == 0 ? x : drop(x.tail, n-1) Base.iterate(l::List, ::Nil) = nothing Base.iterate(l::List, state::Cons = l) = state.head, state.tail