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

List operator '|' #7

Open
DocThreeC opened this issue Nov 29, 2018 · 2 comments
Open

List operator '|' #7

DocThreeC opened this issue Nov 29, 2018 · 2 comments

Comments

@DocThreeC
Copy link

I was just testing pyson with some examples, such as a variation of the blocks world, when I just realized that the '|' operator to deal with the "rest" of a list, when you are working with the head of a list for instance, is not supported.

@niklasf
Copy link
Owner

niklasf commented Dec 5, 2018

Let's see if I understand the semantics. Let L = [1, 2, 3, 4, 5, 6].

(1) Then L = [A,B,C|D] is supposed to unify as A=1, B=2, C=3, D=[4,5,6]?
(2) Can | be used multiple times, e.g. L = [A,B,C|D|E]?
(3) Can , be used after |, e.g. L = [A,B,C|D,E]?

Will have to check how the Java implementation handles this.

@DocThreeC
Copy link
Author

We were interested in the (1) option, that was the one giving us error, but it is true that we were not considering the other two possibilities, and we don't know how the Java implementation deals them.

Thank you for the answers. We will be following your advances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants