Function tupleops::unprepend [−][src]
pub fn unprepend<Tpl>(tpl: Tpl) -> (Head<Tpl>, Tail<Tpl>) where
Tpl: TupleUnprepend<Tpl>,
This is supported on crate feature
unprepend
only.Expand description
Extract the first element of a tuple, and return a tuple of the first element and the last elements of the tuple.
use tupleops::unprepend;
assert_eq!(
unprepend((1, 2, 3, 4)),
(1, (2, 3, 4)),
);
See also: Head, Tail, TupleUnprepend.