kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

new problem related to (f) . (x;y) #594

Closed tavmem closed 4 years ago

tavmem commented 4 years ago

While exploring variations of the problem reported in issue #588 I came across a new problem (not a valence error) In k2.8, you get the same result using any of these 3 variations:

  1 2 ,'' 3 4
(1 3
 2 4)

  {x,''y} . (1 2;3 4)
(1 3
 2 4)

  (,'') . (1 2; 3 4)
(1 3
 2 4)

In kona, 2 out of the 3 variations yield the wrong result

  1 2 ,'' 3 4
((1 3
  2 3)
 (1 4
  2 4))

  {x,''y} . (1 2;3 4)
((1 3
  2 3)
 (1 4
  2 4))

  (,'') . (1 2; 3 4)
(1 3
 2 4)

Surprisingly, the variation yielding the correct result in kona is the variation that has the problem in issue #588:

  1 2 ,/:\: 3 4
((1 3
  1 4)
 (2 3
  2 4))

  {x,/:\:y} . (1 2;3 4)
((1 3
  1 4)
 (2 3
  2 4))

  (,/:\:) . (1 2; 3 4)
valence error
(,/:\:) . (1 2; 3 4)
        ^
>