From 45c907426052ba2d5658b719371b6c49bdd11177 Mon Sep 17 00:00:00 2001 From: olpc user Date: Fri, 13 Dec 2019 11:08:49 -0800 Subject: stub update --- starts/meaning-vm/habit-starts/learning-parts.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'starts/meaning-vm/habit-starts/learning-parts.cpp') diff --git a/starts/meaning-vm/habit-starts/learning-parts.cpp b/starts/meaning-vm/habit-starts/learning-parts.cpp index 92afc7d..ed91f3e 100644 --- a/starts/meaning-vm/habit-starts/learning-parts.cpp +++ b/starts/meaning-vm/habit-starts/learning-parts.cpp @@ -1,19 +1,18 @@ #include "learning-parts.hpp" using namespace habitstarts; -using namespace intellect::level1; +using namespace intellect::level2; static int __init = ([]()->int{ - ahabit(happened-habit, + ahabit(happened-habit, ((happened, ev)), { - ref ev = ctx.get(happens); - // TODO: perform each event associated with ctx[happens] (see line above) + // TODO: perform each event associated with ctx[happened] // use a sub-habit for each call, so we can handle happened for them, too. }); - ahabit(whenever-habit, + ahabit(whenever-habit, ((happens, ev), (action, act), (action-context, actctx)), { // store ctx[action] on ctx[happens] as behavior to do // store ctx[action-context] as context for behavior @@ -24,12 +23,12 @@ static int __init = ([]()->int{ // a unique concept ref for each error type. plan to add to level-0. }); - ahabit(stop-when-habit, + ahabit(stop-when-habit, ((action, act), (happens, ev)), { // remove doing ctx[action] for ctx[happens] }); - ahabit(once-habit, + ahabit(once-habit, ((happens, ev), (action, act), (action-context, actctx)), { // takes ctx[action] and ctx[happens] and ctx[action-context] // uses above habits to do the action only once, probably by using -- cgit v1.2.3