Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Mandelbrot set in C++11. Parent comment
escape's function signature is much simpler:
int escape(std::complex<double> c, int iter_max, const std::function<std::complex<double>(std::complex<double>, std::complex<double>)> &func)
auto func = [] (std::complex <double> z, std::complex<double> c) -> std::complex<double> {return z * z * z + c; };
template< typename Func > int escape(std::complex<double> c, int iter_max, Func& func)
escape's function signature is much simpler:
At least we get to use "auto" when we define func, though: