public static IoObject slotRemoveAt(IoObject target, IoObject locals, IoObject message) { IoMessage m = message as IoMessage; IoObject key = m.localsSymbolArgAt(locals, 0); IoMap dict = target as IoMap; dict.map[key.ToString()] = null; return(target); }
public static IoObject slotAtPut(IoObject target, IoObject locals, IoObject message) { IoMessage m = message as IoMessage; IoObject key = m.localsValueArgAt(locals, 0); IoObject value = m.localsValueArgAt(locals, 1); IoMap dict = target as IoMap; dict.map[key.ToString()] = value; return(target); }
public static IoObject slotAtIfAbsentPut(IoObject target, IoObject locals, IoObject message) { IoMessage m = message as IoMessage; IoObject key = m.localsValueArgAt(locals, 0); IoObject value = m.localsValueArgAt(locals, 1); IoMap dict = target as IoMap; if (dict.lookupMap(key) == null) { dict.map[key.ToString()] = value; } return(target); }