plus`times`factorial`minus/1 2 3 4 5 - x is: 4 y is: 5 result: _1 ! x is: 3 y is: _1 result: _1 * x is: 2 y is: _1 result: _2 + x is: 1 y is: _2 result: _1 _1 plus`times`factorial`minus/5 4 3 2 1 - x is: 2 y is: 1 result: 1 ! x is: 3 y is: 1 result: 0 * x is: 4 y is: 0 result: 0 + x is: 5 y is: 0 result: 5 5
2012/1/3 Björn Helgason <gos...@gmail.com> > +`*`!`-/1 2 3 4 5 > _1 > +`*`!`-/5 4 3 2 1 > 5 > > 2012/1/3 Linda Alvord <lindaalv...@verizon.net> > >> Here is another WOW ! >> >> f=: 13 :'x*y' >> f >> * >> f/1 2 3 4 5 6 7 >> 5040 >> */1 2 3 4 5 6 7 >> 5040 >> !7 >> 5040 >> >> Sometimes the little surprises are amazing. >> >> Now how about Fibonacci ---- >> >> Linda >> >> >> -----Original Message----- >> From: programming-boun...@jsoftware.com [mailto: >> programming-boun...@jsoftware.com] On Behalf Of Björn Helgason >> Sent: Tuesday, January 03, 2012 5:50 AM >> To: Programming forum >> Subject: Re: [Jprogramming] Binary representation without #: or #. >> >> f/ 5 4 3 2 1 >> x >> 2 >> y >> 1 >> x >> 3 >> y >> 2 >> x >> 4 >> y >> 6 >> x >> 5 >> y >> 24 >> 120 >> >> 2012/1/2 Kip Murray <k...@math.uh.edu> >> >> > Linda, Björn has a wonderful answer for your problem as I understood it. >> > Here is another example. Suppose >> > >> > f =: 4 : 'x * y' >> > >> > Then f/ 5 4 3 2 1 is 5 f 4 f 3 f 2 f 1 so >> > >> > >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> >> ---------------------------------------------------------------------- >> For information about J forums see http://www.jsoftware.com/forums.htm >> > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm