Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
empty :: Shape coord
empty = Shape (const False)
superposeAll :: Foldable f => f (Shape coord) -> Shape coord
superposeAll shapes = Shape $ \coord -> any (`isInShape` coord) shapes
superpose :: Shape coord -> Shape coord -> Shape coord
superpose s1 s2 = superposeAll [s1, s2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment