用法:
Base.rest(collection[, itr_state])用於獲取 collection 尾部的通用函數,從特定的迭代狀態 itr_state 開始。返回 Tuple ,如果 collection 本身是 Tuple ,則為 AbstractVector 的子類型,如果 collection 是 AbstractArray ,則 AbstractString 的子類型 如果 collection 是 AbstractString和任意迭代器,否則回退到 Iterators.rest(collection[, itr_state]) 。
可以為用戶定義的集合類型重載以自定義 slurping in assignments 的行為,例如 a, b... = collection 。
Julia 1.6
Base.rest 至少需要 Julia 1.6。
另請參閱: 、first  。Iterators.rest 
例子
julia> a = [1 2; 3 4]
2×2 Matrix{Int64}:
 1  2
 3  4
julia> first, state = iterate(a)
(1, 2)
julia> first, Base.rest(a, state)
(1, [3, 2, 4])相關用法
- Julia reshape用法及代碼示例
- Julia resize!用法及代碼示例
- Julia rem用法及代碼示例
- Julia reduce方法用法及代碼示例
- Julia redirect_stdio用法及代碼示例
- Julia readchomp用法及代碼示例
- Julia readuntil用法及代碼示例
- Julia replace!用法及代碼示例
- Julia real方法用法及代碼示例
- Julia readlines用法及代碼示例
- Julia replace()用法及代碼示例
- Julia retry用法及代碼示例
- Julia read用法及代碼示例
- Julia reverseind用法及代碼示例
- Julia reim用法及代碼示例
- Julia repeat方法用法及代碼示例
- Julia readline用法及代碼示例
- Julia repeat用法及代碼示例
- Julia repr方法用法及代碼示例
- Julia reverse!用法及代碼示例
- Julia replace方法用法及代碼示例
- Julia repeat()用法及代碼示例
- Julia reverse方法用法及代碼示例
- Julia readeach用法及代碼示例
- Julia reverse()用法及代碼示例
注:本文由純淨天空篩選整理自julialang.org 大神的英文原創作品 Base.rest — Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。
