Hi guys,

Is there a reason there is no _hasValue_ procedure in the tables module? I have 
this code: 
    
    
    var
        uniqueObjects = newSeq[myObject]()
        objectTable = newTable[int, myObject]()
    
    for item in allObjects:
        if not(item in uniqueObjects):
            uniqueObjects.add(item)
    
    objectTable[] = mySeqToTableProc(uniqueObjects)
    

But is there a way to write it like so: 
    
    
    var
        objectTable = newTable[int, myObject]()
        counter = 0
    
    for item in allObjects:
        if not(objectTable.hasValue(item)):
            objectTable[counter] = item
            counter += 1
    

Thanks

Reply via email to