Kevin Smith (2013-05-10T13:58:24.000Z)
github at esdiscuss.org (2013-07-12T02:27:21.263Z)
> class AsyncTable<T,U> { > constructor() { > this.m = Map<T,U>(); // encapsulation doesn't matter for this example > } > set(keyP :Promise<T>, val :U) { > keyP.then(key => { this.m.set(key, val) }); > } > get(keyP :Promise<T>) :Promise<U> { > return keyP.then(key => this.m.get(key)); > } > } The way to make this work would be to lift the value stored in the map. ```js get(keyP :Promise<T>) :Promise<U> { return keyP.then(key => Q.fullfill(this.m.get(key))); } ``` Do you agree? Is your premise that forgetting such a "lawyer-ly" detail will amount to a foot-gun?