-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
answeredTutorial question is answered but not added to docsTutorial question is answered but not added to docshelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requestedtutorialTutorial questionTutorial question
Description
Suppose we have a function like this
(: rec-func (-> Expression Atom))
(= (rec-func $expr)
(trace! $expr
(if-decons-expr $expr $head $tail
(let $res ($head) (let () (println! $res) (rec-func $tail)))
(println! "processing finished"))))
We want to pass some other functions as arguments
(= (func1) 1)
(= (func2) 2)
(= (func3) 3)
without preliminary execution.
This type of call can't be resolved:
!(rec-func (func1 func2 func3))
The output is
[(trace! (func1 func2 func3) (if-decons-expr (func1 func2 func3) $head#21 $tail#22 (let $res#23 ($head#21) (let () (println! $res#23) (rec-func $tail#22))) (println! "processing finished")))]
However with the previous versions of Metta the output was
(func1 func2 func3)
1
(func2 func3)
2
3
3
()
processing finished
That is still not what we want, but it resolved by the interpreter.
The problem is how to achieve behavior like that:
(func1 func2 func3)
1
(func2 func3)
2
(func3)
3
()
processing finished
with the current state of Metta?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
answeredTutorial question is answered but not added to docsTutorial question is answered but not added to docshelp wantedExtra attention is neededExtra attention is neededquestionFurther information is requestedFurther information is requestedtutorialTutorial questionTutorial question