last multimethod
Methods
- last(e:Eachable1, pattern:Any=method, dflt:Any=block) Source: stdlib.ngs:1576
Find last element in e that matches the pattern. Parameters
pattern Test function or anything else acceptable by =~, defaults to Bool.constructors Returns
Either the element or the provided default if element was not found.Example
[1,2,3].last(X>1, 10) == 3 [].last() # ElementNotFound exception