Skip to content

Commit

Permalink
Merge pull request #483 from trueagi-io/lettype
Browse files Browse the repository at this point in the history
fix let return type
  • Loading branch information
vsbogd authored Nov 2, 2023
2 parents b7e55c4 + ca94de6 commit 260167d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/src/metta/runner/stdlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<Atom>, ExecError> {
Expand Down Expand Up @@ -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<Vec<Atom>, ExecError> {
Expand Down

0 comments on commit 260167d

Please sign in to comment.