(List comprehensions are faster than `map()` here for some reason: https://codereview.chromium.org/235153002/#msg4)