summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruser <user@localhost.localdomain>2019-12-19 18:03:19 -0800
committeruser <user@localhost.localdomain>2019-12-19 18:03:19 -0800
commitb7847826aceabc8a96d28676f6378e414eb069ac (patch)
tree0a6956f3ee75bd47a216c15a3109c6d0e9d497e1
parentfdb47704ab6f0aa6c0e2b35f8a9b55bf275bd5fe (diff)
downloadstandingwithresilience-b7847826aceabc8a96d28676f6378e414eb069ac.tar.gz
standingwithresilience-b7847826aceabc8a96d28676f6378e414eb069ac.zip
resolved minor design choice
-rw-r--r--starts/meaning-vm/habit-starts/learning-parts.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/starts/meaning-vm/habit-starts/learning-parts.cpp b/starts/meaning-vm/habit-starts/learning-parts.cpp
index 009719a..bf1bb09 100644
--- a/starts/meaning-vm/habit-starts/learning-parts.cpp
+++ b/starts/meaning-vm/habit-starts/learning-parts.cpp
@@ -157,18 +157,12 @@ static int __init = ([]()->int{
{
if (!happened.linked(whenever-list)) { return; }
- (until-each-list-item-context-in-list)(action-whenever-happened, ctx, happened.get(whenever-list));
-
- OR
-
ref stub = a(event);
stub.set(event, ev);
(until-each-list-item-context-in-list)(action-whenever-happened, stub, happened.get(whenever-list));
});
- ahabit(action-whenever-happened, ((list-item, li), (happened-context, hapctx)),
- OR
ahabit(action-whenever-happened, ((list-item, li), (event, h)),
{
// here: when we trigger a behavior, we want information associated with producing the trigger,
@@ -182,15 +176,11 @@ static int __init = ([]()->int{
// in the list, then we inject our context
// into that, inside a "happened" property.
- i.get(action)(hapctx, i.get(action-context));
-
- OR
-
ref actctx = i.get(action-context);
actctx.set(happened, h);
- i.get(action).fun<ref>()(i.get(actctx));
+ i.get(action).fun<ref>()(actctx);
});
ahabit(whenever-habit, ((happens, ev), (action, act), (action-context, actctx)),