value = lookup(obj, ...)
[value, found] = lookup(obj, ...)
| Parameter | Description |
|---|---|
| obj | object that implements keyed value lookup. |
| key | key to look up. |
| Parameter | Description |
|---|---|
| value | value associated with the key. |
| found | logical value indicating whether the lookup succeeded, when returned by the object implementation. |
lookup dispatches value lookup to the object type passed as first argument.
If the first argument does not implement lookup, Nelson reports that the function is not implemented for that type.
d = dictionary(["one" "two"], [1 2]);
value = lookup(d, "two")
| Version | Description |
|---|---|
| 2.0.0 | initial version |