Last active
February 22, 2016 16:06
-
-
Save skyebook/d3da22e34226d10cf480 to your computer and use it in GitHub Desktop.
Javascript has the really nice 'every', while we do this in swift. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Is every point in this rectangle? This would be easy in JS. | |
let containsAllPoints = points.reduce(true) { return !$0 ? $0 : CGRectContainsPoint(rect, $1)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment