當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


Julia front用法及代碼示例

用法:

front(x::Tuple)::Tuple

返回由 x 的最後一個組件以外的所有組件組成的 Tuple

另請參閱: first tail

例子

julia> Base.front((1,2,3))
(1, 2)

julia> Base.front(())
ERROR: ArgumentError: Cannot call front on an empty tuple.

相關用法


注:本文由純淨天空篩選整理自julialang.org 大神的英文原創作品 Base.front — Function。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。