Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active September 13, 2017 11:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
template<typename Coordinate>
Shape<Coordinate> allSpace() {
return [](Coordinate const&) {
return true;
};
}
template<typename Coordinate>
Shape<Coordinate> intersect(Shape<Coordinate> const& lhs, Shape<Coordinate> const& rhs) {
return [=](Coordinate const& coord) {
return lhs(coord) && rhs(coord);
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment