Example: No consecutive duplicates #2832
triska
started this conversation in
Show and tell
Replies: 1 comment
-
The unexpected variable order is already filed as an issue: #1578. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear all,
today I came across a discussion where the task, declaratively speaking, is to describe the relation between a list and a version of the list without consecutive duplicates.
For instance:
Examples:
Note how it wouldn't capture the generality of the relation to say that the code "eliminates" duplicated list elements, because no lists are given at all in such cases, and no single element is known. Yet we can use the relation also in such cases, and it yields correct answers.
Notice an unexpected variable order in a few leaf answers, such as:
where Scryer would better yield:
A general, efficient and straight-forward to define relation that works in all usage modes and execution strategies.
All the best,
Markus
Beta Was this translation helpful? Give feedback.
All reactions