Created
September 9, 2017 17:01
-
-
Save deque-blog/d66fb745ea29771cbcc898e3a156bbd8 to your computer and use it in GitHub Desktop.
This file contains 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
intersectAll :: Foldable f => f (Shape coord) -> Shape coord | |
intersectAll shapes = Shape $ \coord -> all (`isInShape` coord) shapes | |
intersect :: Shape coord -> Shape coord -> Shape coord | |
intersect s1 s2 = intersectAll [s1, s2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment