I create inctest.clj with the following content
(println ((fn [f] (f 0)) inc))
When compiling, an error occurs:
$ g++ -std=c++11 -pthread inctest.cpp
inctest.cpp:2812:40: error: 'inc' does not refer to a value
run(println(),run(FN__4519(),inc));
^
inctest.cpp:2685:24: note: declared here
class inc final : public lambda_i{
Note: replacing inc with (identity inc) works and prints the number 1 as expected.
I create inctest.clj with the following content
When compiling, an error occurs:
Note: replacing
incwith(identity inc)works and prints the number1as expected.