|
uniqueInsert
|
The uniqueInsert function destructively inserts the specified new value
into the Structure at the specified location. If the key argument {newKey}
does not exist in the Structure, the Structure is increased in size to accommodate
the new key. If the key is already in the Structure, no insertion is made.
The index where the new key was inserted or (if already in the Structure) the index
where the key was found will be returned by the uniqueInsert function.
The uniqueInsert function is used whenever you want to install a new key into a structure. Also the uniqueInsert function behaves like the binaryInsert function except the target structure is not in sorted order.
(uniqueInsert struct newkey) The index where the key was installed or where the key was found.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_Structure_uniqueInsert_001
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types struct The structure to be updated. Structure newkey The new key to be installed in the Structure. Symbol
Returns:
Examples
Argument Types
Structure
Symbol
Integer
Character
String
Symbol
Vector
BitVector
ByteVector
IntVector
FltVector
ObjVector
Structure
Dictionary
Directory
ShortVector
Matrix
NumMatrix
Integer
Float
Number
Complex
How do I contact the AIS team?