From ca94de65bf016cc994b7547d5552dc0d8a059ee5 Mon Sep 17 00:00:00 2001 From: Alexey Potapov Date: Thu, 2 Nov 2023 17:58:52 +0300 Subject: [PATCH] fix let return type --- lib/src/metta/runner/stdlib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/metta/runner/stdlib.rs b/lib/src/metta/runner/stdlib.rs index dfb64e0df..652ab02be 100644 --- a/lib/src/metta/runner/stdlib.rs +++ b/lib/src/metta/runner/stdlib.rs @@ -869,7 +869,7 @@ use std::collections::HashSet; impl Grounded for LetOp { fn type_(&self) -> Atom { // TODO: Undefined for the argument is necessary to make argument reductable. - Atom::expr([ARROW_SYMBOL, ATOM_TYPE_ATOM, ATOM_TYPE_UNDEFINED, ATOM_TYPE_ATOM, ATOM_TYPE_ATOM]) + Atom::expr([ARROW_SYMBOL, ATOM_TYPE_ATOM, ATOM_TYPE_UNDEFINED, ATOM_TYPE_ATOM, ATOM_TYPE_UNDEFINED]) } fn execute(&self, args: &[Atom]) -> Result, ExecError> { @@ -930,7 +930,7 @@ impl Display for LetVarOp { impl Grounded for LetVarOp { fn type_(&self) -> Atom { // The first argument is an Atom, because it has to be evaluated iteratively - Atom::expr([ARROW_SYMBOL, ATOM_TYPE_ATOM, ATOM_TYPE_ATOM, ATOM_TYPE_ATOM]) + Atom::expr([ARROW_SYMBOL, ATOM_TYPE_ATOM, ATOM_TYPE_ATOM, ATOM_TYPE_UNDEFINED]) } fn execute(&self, args: &[Atom]) -> Result, ExecError> {