Most elegant is 3 (-.~&i.) 7 3 4 5 6
Or if you want to include y 3 (-.~&i. >:) 7 3 4 5 6 7 R.E. Boss -----Oorspronkelijk bericht----- Van: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Namens Geoff Canyon Verzonden: maandag 22 september 2008 9:19 Aan: Programming forum Onderwerp: [Jprogramming] Integers from x to y Some programming languages have built-in commands that give the integers from x to y. I thought that would be a nice thing to have in J, so I wrote this: f =: [+i.@(0&>[EMAIL PROTECTED])~ Is that a reasonable way to go about it? regards, Geoff ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
