Methods
only
ΒΆ
only(predicate:
Any
, mapper:
Fun
)
Transform mapper to handle only items matching predicate. Non-matching items will be returned as is.
Source:
stdlib.ngs:177
Example
["abc", 1, "def", 2].map(only(Int, X*2)) # ["abc", 2, "def", 4]