Skip to content

Instantly share code, notes, and snippets.



Last active Sep 13, 2017
What would you like to do?
template<class Coordinate>
using Shape = std::function<bool (Coordinate const&)>;
using Coord2D = std::pair<double, double>;
using Shape2D = Shape<Coord2D>;
template<class Coordinate>
Shape<Coordinate> outside(Shape<Coordinate> const& s) {
return [=](Coordinate const& coord) {
return not s(coord);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment