Jose Mario Quintana wrote: > > What is wrong with the agenda in the last line? > > (- %) 1 2 3 4 5 > 0 1.5 2.66666667 3.75 4.8 > > (-`%)@.(0 1) 1 2 3 4 5 > 0 1.5 2.66666667 3.75 4.8 > > (-`%)@.((0 1)"_) 1 2 3 4 5 > |rank error > | (-`%)@.((0 1)"_)1 2 3 4 5 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > >
There is one problem that is perhaps related to your question: If we try to write a conjunction that models the expected behavior of m...@.v to which you refer, we get: Ag =: 2 : 'm...@.(v y) y' -`% Ag ((0 1)"_) 1 2 3 4 5 0 1.5 2.66667 3.75 4.8 Ag, however, models only the monadic case of the expected verb m...@.v The problem: is there any way (i.e tacit/implicit) to model the dyadic case of the expected m...@.v ? For example: 1 2 3 4 5 -`% @.(0 1) 1 2 3 4 5 0 1.5 2.66667 3.75 4.8 1 2 3 4 5 -`% @.(0 1"_) 1 2 3 4 5 |rank error | 1 2 3 4 5 -...@.(0 1"_)1 2 3 4 5 1 2 3 4 5 -`% Ag(0 1"_) 1 2 3 4 5 |domain error | 1 2 3 4 5 -`%Ag(0 1"_)1 2 3 4 5 The solution then should work as the first of these three examples when given 0 1"_ (it would be fine if it didn't work when given 0 1). -- View this message in context: http://old.nabble.com/Wrong-agenda--tp26426928s24193p26458126.html Sent from the J Programming mailing list archive at Nabble.com. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm