lookup
Look up values in an object.
📝Syntax
value = lookup(obj, ...)
[value, found] = lookup(obj, ...)
📥Input Arguments
Parameter Description
obj object that implements keyed value lookup.
key key to look up.
📤Output Arguments
Parameter Description
value value associated with the key.
found logical value indicating whether the lookup succeeded, when returned by the object implementation.
📄Description

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.

💡Examples
Look up a value in a dictionary through the generic function.
d = dictionary(["one" "two"], [1 2]);
value = lookup(d, "two")
🔗See Also
dictionaryisKeyinsertremove
Used Functions
dictionary
🕔Version History
Version Description
2.0.0 initial version
Edit this page on GitHub