mapo multimethod
Methods
- mapo(e:Eachable1, mapper:Fun)experimental Source: stdlib.ngs:1083
EXPERIMENTAL! Do not use! Map e to same type. Mnemonics: "map original" / "MAP to Original type". Parameters
e object of any type that has each(e, callback) implemented Eachable1. WARNING: instances of same type as e must have empty constructor and push() method. Returns
Of same type as eExample
Set([1,2]).mapo(X*2) # Set([2,4])
- mapo(s:Str, mapper:Fun) Source: stdlib.ngs:4618
Map a string, character by character. Returns
StrExample
"abcd".mapo(F(x) if x == "b" then "X" else x) # "aXcd"