python-agentspeak icon indicating copy to clipboard operation
python-agentspeak copied to clipboard

List operator '|'

Open DocThreeC opened this issue 7 years ago • 2 comments

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.

DocThreeC avatar Nov 29 '18 16:11 DocThreeC

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.

niklasf avatar Dec 05 '18 15:12 niklasf

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.

DocThreeC avatar Dec 11 '18 15:12 DocThreeC