.= multimethod
Methods
- .=(obj:NormalType, field:Str, v:Any)
Set NormalType (a type that is typically defined by user) field. Throws FieldNotFound. Automatically called by NGS for syntax
obj.field = v
Parameters
field Field to set. Currently only "user" is supported. Returns
v
- .=(obj:NormalTypeInstance, field:Str, v:Any)
Set Normal type (a type that is typically defined by user) instance field Automatically called by NGS for syntax
obj.field = v
Returns
vExample
type T; t=T(); t.x=1
- .=(hl:HashLike, k:Any, v:Any) Source: stdlib.ngs:1644
Set value. Automatically called by NGS for syntax
your_hashlike.literal_key = v
Returns
v
- .=(t:Type, field:Str, ns:Namespace) Source: stdlib.ngs:1818
Undocumented Automatically called by NGS for syntax
SUBTYPE_OF_NAMEDINSTANCES.NamedInstances = ...
- .=(t:Type, field:Str, a:Arr) Source: stdlib.ngs:1837
Undocumented Automatically called by NGS for syntax
SUBTYPE_OF_NAMEDINSTANCES.NamedInstances = ['SOME', 'NAMES', ...]
- .=(h:Hash, field:Str, v:Any) Source: stdlib.ngs:2396
Set hash key. Returns
vExample
h = {"a": 1} h.a = 2 # 2, Same as h["a"] = 2
- .=(a:Arr, field:Str, e:Eachable1) Source: stdlib.ngs:2425
Set field of every element in array to corresponding item in e. Uses Iter(e) internally. Returns
aExample
a=[{"x": 1}, {"x": 2}] a.y = [10, 20] # a == [{"x": 1, "y": 10}, {"x": 2, "y": 20}]