TupleTools.jl icon indicating copy to clipboard operation
TupleTools.jl copied to clipboard

add front2

Open cossio opened this issue 5 years ago • 0 comments

Just like tail2, it seems useful to also have front2:

@inline front2(t::Tuple{Any, Any, Vararg{Any}}) = argfront2(t...)
@inline argfront2(a, b...) = (a, argfront2(b...)...)
@inline argfront2(a, b) = ()

cossio avatar Mar 06 '20 08:03 cossio