SplitScript reference / IndexAssign
IndexAssign
capability
capability IndexAssign
Replaces or inserts a value through bracket assignment.
Every assignable index is also readable and therefore shares the exact Index.Key and Index.Value types. Source structs participate by defining both the inherited Index.at method and an exact IndexAssign.set method.
Examples
Assign through an index
let scores = Map.new<String, u32>()
scores["Ada"] = 12
Requires
| Member | Description | Available through |
|---|---|---|
| Index | Reads a value selected by bracket indexing. |
Methods
| Member | Description | Available through |
|---|---|---|
| set | Stores a value selected by a key. |