-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
What is your problem?
Combining case with Empty evaluates twice the non empty branch.
How to reproduce your problem?
Run the following code with PeTTa:
!(case 42
((42 (trace! Here 42))
(Empty (trace! There 0))))What would normally expect?
Here
42
What do you get instead?
Here
Here
42
What else do you have say?
Taking the empty branch by running the following
!(case (empty)
((42 (trace! Here 42))
(Empty (trace! There 0))))works as expected.
Also, when replacing the Empty case by NotEmpty
!(case 42
((42 (trace! Here 42))
(NotEmpty (trace! There 0))))it also works as expected (i.e. (trace! Here 42) is only taken once).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request