summaryrefslogtreecommitdiff
path: root/starts/meaning-vm/habit-starts/learning-parts.cpp
diff options
context:
space:
mode:
authorolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-13 11:08:49 -0800
committerolpc user <olpc@xo-5d-f7-86.localdomain>2019-12-13 11:08:49 -0800
commit45c907426052ba2d5658b719371b6c49bdd11177 (patch)
treed8dce77c8fb27f6c96bcc02a4aedf89165120d76 /starts/meaning-vm/habit-starts/learning-parts.cpp
parent3d4f57e3ba54ec4d63c1c94f35fd642b90cf1f29 (diff)
downloadstandingwithresilience-45c907426052ba2d5658b719371b6c49bdd11177.tar.gz
standingwithresilience-45c907426052ba2d5658b719371b6c49bdd11177.zip
stub update
Diffstat (limited to 'starts/meaning-vm/habit-starts/learning-parts.cpp')
-rw-r--r--starts/meaning-vm/habit-starts/learning-parts.cpp13
1 files changed, 6 insertions, 7 deletions
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