lisp like operetor collection on well kown C++ data structure
I wrote scm2cpp.hpp https://github.com/niitsuma/scm2cpp.hpp/blob/master/scm2cpp.hpp scm2cpp.hpp is lisp like operetor collection on well kown C++ data structure lisp function car cdr cons list-ref set-car! .. etc can use for std::vector std::list boost::ptr_list boost::fusion::list and std::pair is regard as cons example usage https://github.com/niitsuma/scm2cpp.hpp/blob/master/usage.cpp https://github.com/niitsuma/scm2cpp.hpp/blob/master/list-test.cpp Also eq? eqv? equal? quote symbol functions are implemented. plz see usege https://github.com/niitsuma/scm2cpp.hpp/blob/master/equal-test.cpp eq? function implimeted as direct addrest comparison template<typename T> bool is_eq(T & x, T & y) {return (&x)==(&y);} thus cons(T, std::list<T>) becomes boost::ptr_list<T> All lisp like operator keep same address for same object.
participants (1)
-
Niitsuma Hirotaka