jsoftware / jsource

J engine source mirror
Other
645 stars 91 forks source link

indirect locative verb results #125

Open rdm opened 2 years ago

rdm commented 2 years ago
example1=:{{
  o=. cocreate''
  a__o=: m
  v__o=: {{y{a}}
}}

example2=:{{
  o=. cocreate''
  a__o=: m
  v__o=: {{y{a}}
  v__o
}}

example3=:{{
  o=. cocreate''
  a__o=: m
  v__o=: {{y{a}}
  ('v_',(;o),'_')~
}}

   F1=: 'abc' example1
   F2=: 'abc' example2
   F3=: 'abc' example3
   F1 1
|noun result was required: F1
|       y{a
   F2 1
|value error: o
|       F2 1
   F3 1
b

Ideally, F2 should behave like F3.

(Is there a use case where the current behavior of F2 is desirable?)