Skip to content

Instantly share code, notes, and snippets.

@deque-blog
Last active September 13, 2017 11:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deque-blog/a7b6c951bafd9f7f9ebc2577483abc57 to your computer and use it in GitHub Desktop.
Save deque-blog/a7b6c951bafd9f7f9ebc2577483abc57 to your computer and use it in GitHub Desktop.
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