Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse expression does not get reduced when used inside cons-atom #159

Closed
vulecoff opened this issue Oct 16, 2024 · 1 comment
Closed

Parse expression does not get reduced when used inside cons-atom #159

vulecoff opened this issue Oct 16, 2024 · 1 comment
Assignees
Labels
bug Issues that represent errors in the code compatibility Issues related compatibility with other versions of MeTTa
Milestone

Comments

@vulecoff
Copy link
Contributor

vulecoff commented Oct 16, 2024

Bugged code: !(cons-atom (parse "1") ())

  • Expected: [(1)]
  • Actual: [ ( (parse "1") )]

I suspected there're some edge cases in order of evaluation when combining these 2 specific expressions. parse works as expected when used with other expressions, so far:

  • !(foldl-atom ((parse "1") 1 1) 0 $acc $x (+ $acc $x)) --> 3
  • !(let $x (parse "1") (cons-atom $x ())) --> (1)
@TeamSPoon TeamSPoon added this to the Month 4 of 5 milestone Nov 11, 2024
@TeamSPoon
Copy link
Collaborator

fixed in 370696c

metta+>!(cons-atom (parse "1") ())
[(1)]
metta+>!(foldl-atom ((parse "1") 1 1) 0 $acc $x (+ $acc $x))
[3]
metta+>!(let $x (parse "1") (cons-atom $x ()))
[(1)]
metta+>

@TeamSPoon TeamSPoon self-assigned this Nov 22, 2024
@TeamSPoon TeamSPoon added bug Issues that represent errors in the code compatibility Issues related compatibility with other versions of MeTTa labels Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that represent errors in the code compatibility Issues related compatibility with other versions of MeTTa
Projects
None yet
Development

No branches or pull requests

2 participants