Path: utzoo!mnetor!tmsoft!itcyyz!yrloc!hui From: hui@yrloc.ipsa.reuter.COM (Roger Hui) Newsgroups: comp.lang.apl Subject: Re: J questions Message-ID: <1991Apr5.015530.4750@yrloc.ipsa.reuter.COM> Date: 5 Apr 91 01:55:30 GMT References: <2APR91.18555001@uc780.umd.edu> Reply-To: hui@yrloc.ipsa.reuter.COM (Roger Hui) Organization: Iverson Software Inc. Lines: 24 In article weg@convx1.ccit.arizona.edu (Eythan Weg) writes: >I will revise my first question: >Let t=.2 : '(x.1{.y.),_1{.y.'. Now ^&2 t 2 3 should produce 4 3. >I want to see t as a black box which operates on the right on vectors. >Now how do I deal with a matrix whose rows are supposed to serve as >a series of right operands? How can I force the conjunction to behave >as if it is a verb with a specified right rank? So if a=.i.4 then >^&3 t "1 a will give 2 2$0 1 8 3. My problem is that " works >essentially on verbs. The rank conjunction " does indeed work only on verb right arguments. If f is verb, then f"0 x applies f to each rank-0 cell (each scalar) of x f"1 x applies f to each rank-1 cell (each vector) of x f"k x applies f to each rank-k cell of x (Try x=.i.2 3 4 5 and f=.< or f=.+/ ) No other conjunction needed. If you insist on having this conjunction t, it is for reasons that you have not yet mentioned. Roger Hui Iverson Software Inc., 33 Major Street, Toronto, Ontario M5S 2K9 (416) 925 6096