def assoc(d, key, value, factory=dict):
 d2 = factory()
 d2[key] = value
 return merge(d, d2, factory=factory)

def assoc ( d , key , value , factory = dict ) : d2 = factory ( ) d2 [ key ] = value return merge ( d , d2 , factory = factory )
return a new dict with new key value pair new dict has d[key] set to value .