Thank you Roger, Cliff and Henry for your rapid response! Lots of food for thought to digest.
I will move on with my life now... Esa -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Roger Hui Sent: 13.04.2009 18:04 To: Programming forum Subject: Re: [Jprogramming] How to make a tacit dyadic verb with the power conjuction? 5 +:^:(<@{:`{.)@, 3 5 10 20 The particular difficulty in this case is that one of the arguments of the conjunction (^:) has to be be an argument of the overall verb. For that you need one of the forms u^:(f`g) or u^:(f`g`h) ----- Original Message ----- From: Lippu Esa <[email protected]> Date: Monday, April 13, 2009 7:42 Subject: [Jprogramming] How to make a tacit dyadic verb with the power conjuction? To: Programming forum <[email protected]> > Hi! > > I have been using tacit programming for some time. It is not unusual > that > difficulties arise due to my shallow understanding of the J language. > > The current problem can be demonstrated with a simple example: > > I want a doubling function that takes two parameters. The first > one is > the number to be doubled and the > other one tells how many times. Like: > > +:^: (<3) 5 > 5 10 20 > > How can I do it tacitly, i.e.: 5 multidbl 3 should give the same > result? > The problem appeared when I finally began to program my own life :) > inspired by this demonstration and FinnAPL Tallinn conference in > Estoniastarting on Wednesday (and yes, there are three J-related > presentations,all by our Estonian friends). > > www.youtube.com/watch?v=a9xAKttWgP4 > > I actually got this generation function working somehow but it annoyed > me that I couldn't give the nouns in the same order as in the > presentation, life matrix on the left side and generation count > on the > other. This one was ok: > > gen=.life^:[] > 3 gen R > > I tried to understand the problem by writing a much simpler > function but > didn't get it working tacitly at all. I also tried to find some > information from the documentation but didn't recognize any. It > would be > nice to get my own life working before looking for better life > :) . ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
