From dc2779f5a7ceb226620f39e728b73b028cb17c10 Mon Sep 17 00:00:00 2001 From: olpc user Date: Thu, 26 Dec 2019 08:26:40 -0800 Subject: start closing habit starts in level2 --- starts/meaning-vm/level-2/baseref.hpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'starts/meaning-vm/level-2/baseref.hpp') diff --git a/starts/meaning-vm/level-2/baseref.hpp b/starts/meaning-vm/level-2/baseref.hpp index 8fbcc91..644f4b8 100644 --- a/starts/meaning-vm/level-2/baseref.hpp +++ b/starts/meaning-vm/level-2/baseref.hpp @@ -1,10 +1,8 @@ #pragma once #include "common.hpp" - #include "funcs.hpp" - -#include "../level-1/common.hpp" +#include "../level-1/baseref.hpp" #include @@ -21,10 +19,13 @@ struct baseref : public level1::baseref template ref operator()(ref first, Refs... rest) { return level2::dohabit(self, {first, rest...}); } - template - ref operator()(std::initializer_list first, Pairs... rest) { return level2::dohabit(self, {first, rest...}); } - + ref operator()(std::initializer_list> pairs) { return level2::dohabit(self, pairs); } ref operator()() { return level2::dohabit(self); } + + template + ref act(ref habit, Refs... rest) { return level2::dohabit(habit, {self, rest...}); } + + void replace(ref other) { *self.ptr() = *other.ptr(); } }; } -- cgit v1.2.3