aboutsummaryrefslogtreecommitdiffstats
path: root/core/value.moon
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2020-03-02 13:16:21 +0000
committers-ol <s-ol@users.noreply.github.com>2020-03-02 13:16:21 +0000
commitdf91fee4a7bb17f8822a0a5637533257d30e0743 (patch)
tree54f1a3a7bc7b850cc4b0a87296670612274ca518 /core/value.moon
parentconvert lib.time to IO (diff)
downloadalive-df91fee4a7bb17f8822a0a5637533257d30e0743.tar.gz
alive-df91fee4a7bb17f8822a0a5637533257d30e0743.zip
update lib.math and lib.logic to new op interface
Diffstat (limited to 'core/value.moon')
-rw-r--r--core/value.moon5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/value.moon b/core/value.moon
index d4a0de3..b882507 100644
--- a/core/value.moon
+++ b/core/value.moon
@@ -46,6 +46,11 @@ class Result
assert not (next @side_inputs), msg or "eval-time const expected"
@value
+ -- asserts a value exists and returns its type
+ type: =>
+ assert @value, "Result with value expected"
+ @value.type
+
-- create a value-copy of this result that has the same impulses but without
-- affecting the original's update logic
make_ref: =>