Creates a SnappingPolicy from the given lambda.
that is run whenever SnappingPolicy.shouldSnapTo is called