+ multimethod

Methods

+(a:Real, b:Real)
Addition
+(a:Arr, b:Arr)
Array concatenation.

Returns

Arr

Example

[1,2]+[3,4]  # [1,2,3,4]
+(a:Int, b:Int)
Addition
+(a:Eachable1, b:Eachable1) Source: stdlib.ngs:650
Undocumented
+(s1:Str, s2:Str) Source: stdlib.ngs:1613
Concatenate strings

Returns

New Str

Example

"ab" + "cd"  # "abcd"
+(f:Fun, g:Fun) Source: stdlib.ngs:2416
Compose functions

Returns

Fun f(g(...))

Example

F reject(something, predicate) {
	something.filter(not + predicate)
}
+(a:Hash, b:Hash) Source: stdlib.ngs:2704
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

Hash

Example

{'a': 1, 'b': 2, 'c': 3} + {'b': 20, 'd': 40}  # {'a': 1, 'b': 20, 'c': 3, 'd': 40}
+(s:Str, a:Eachable1) Source: stdlib.ngs:3603
Prepend each line in a with s

Returns

Type of ret is same as type of a

Example

"a " + ["1", "2"]  # ["a 1", "a 2"]
+(a:Eachable1, s:Str) Source: stdlib.ngs:3613
Append s to each line in a

Returns

Type of ret is same as type of a

Example

["1", "2"] + " a"  # ["1 a", "2 a"]
+(a:Set, b:Set) Source: autoload/Set.ngs:52
Set union

Returns

Set