News for hackers. Stuff that matters.
Re:Node.js - A giant step backwards? by ricardobeat on Wednesday January 25, 2012 @04:56PM (#3511926)

    getPosts (ids, cb) ->
        res = []
        stash = (err, post) ->
          res.push post
          cb(res) if res.length is ids.length
        db.getPostById(id, stash) for id in ids
        
    getPosts [...], (posts) ->
        # go on...
use `res[i] = post` if there is some implicit ordering.

There are no comments on this comment yet.