fork download
  1. #include <functional>
  2.  
  3. int main(void)
  4. {
  5. std::function<double(int)> fact = [&](int n) -> double { return (n > 1)? n * fact(n-1): 1; };
  6. }
Success #stdin #stdout 0s 2956KB
stdin
Standard input is empty
stdout
Standard output is empty