Hacker News new | ask | show | jobs
by riobard 6036 days ago
[NOTE: copied from another branch for easy reading for others]

A saner map/filter/product version:

    map(lambda (w,s,l): {'widget': w, 'sprocket': s, 'location': l}
        filter(lambda (w,s,l): l.hasInStock(w) and l.hasInStock(s) and w.isUsableWith(s), 
            product(widgets, sprockets, locations)))