+ multimethod
Methods
- +(a:Real, b:Real)
Addition
- +(a:Arr, b:Arr)
Array concatenation. Returns
ArrExample
[1,2]+[3,4] # [1,2,3,4]
- +(a:Int, b:Int)
Addition
- +(s1:Str, s2:Str) Source: stdlib.ngs:1483
Concatenate strings Returns
New StrExample
"ab" + "cd" # "abcd"
- +(f:Fun, g:Fun) Source: stdlib.ngs:2277
Compose functions Returns
Fun f(g(...))Example
F reject(something, predicate) { something.filter(not + predicate) }
- +(a:Hash, b:Hash) Source: stdlib.ngs:2565
Add Hashes. Builds new hash with key-value pairs from both a and b. If same key is present in both a and b, the value from b is used. Returns
HashExample
{'a': 1, 'b': 2, 'c': 3} + {'b': 20, 'd': 40} # {'a': 1, 'b': 20, 'c': 3, 'd': 40}
- +(s:Str, a:Arr) Source: stdlib.ngs:3461
Prepend each line in a with s Example
"a " + ["1", "2"] # ["a 1", "a 2"]
- +(a:Arr, s:Str) Source: stdlib.ngs:3469
Append s to each line in a Example
["1", "2"] + " a" # ["1 a", "2 a"]
- +(a:Set, b:Set) Source: autoload/Set.ngs:52
Set union Returns
Set