pub fn last(self: Self) ?T
Returns the last element from the list, or null if the list is empty. Never invalidates element pointers.
null
self: Self
609 610 611 612
pub fn last(self: Self) ?T { if (self.items.len == 0) return null; return self.items[self.items.len - 1]; }
Returns the last element from the list, or
nullif the list is empty. Never invalidates element pointers.