diff options
Diffstat (limited to 'starts/meaning-vm/level-2/funcs.cpp')
-rw-r--r-- | starts/meaning-vm/level-2/funcs.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/starts/meaning-vm/level-2/funcs.cpp b/starts/meaning-vm/level-2/funcs.cpp index b11413f..0cef918 100644 --- a/starts/meaning-vm/level-2/funcs.cpp +++ b/starts/meaning-vm/level-2/funcs.cpp @@ -16,6 +16,8 @@ ref & context() return ctx; } +//ref makehabit(ref name, std::list<ref> argnames, std::any + ref makehabit(ref name, std::initializer_list<ref> argnames, std::function<void(ref)> code) { ref habit = level1::a(concepts::habit, name); @@ -71,6 +73,7 @@ ref dohabit(ref habit, std::initializer_list<ref> args) } ref::context().set(posinf[information], posinf[assume]); } + ref::context().set("self", habit); habit.fun<ref>()(ref::context()); posinf = habit.get(information-needed); while (posinf.linked(next-information)) { |