aboutsummaryrefslogtreecommitdiff
path: root/vm.d
diff options
context:
space:
mode:
Diffstat (limited to 'vm.d')
-rw-r--r--vm.d8
1 files changed, 8 insertions, 0 deletions
diff --git a/vm.d b/vm.d
index e34e4bc..a8d3d6e 100644
--- a/vm.d
+++ b/vm.d
@@ -463,6 +463,14 @@ class VM {
Seq seq = asSeq(this.popA());
this.pushA(makeSeqValue(seq.rest()));
break;
+ case OpCode.OP_MOST:
+ Seq seq = asSeq(this.popA());
+ this.pushA(makeSeqValue(seq.most()));
+ break;
+ case OpCode.OP_LAST:
+ Seq seq = asSeq(this.popA());
+ this.pushA(seq.last());
+ break;
case OpCode.OP_LENGTH:
Seq seq = asSeq(this.popA());
this.pushA(makeNumberValue(seq.length()));