c=:1 :'u y [n=:>:n'
   f=:-:@(+1.3&%)
   ":!.17 f c^:_[1.5 [n=:0
1.1401754250991381
   n
5
   ":!.17 f c^:(<_)[1.5 [n=:0
1.5 1.1833333333333333 1.140962441314554 1.1401756965342444 1.1401754250991702
   n
5

It seems that with ^:(<_), it did 5 iterations, but only the results of the 
first 4 along with the original right argument(1.5), is returned.  If you give 
it ^:(<5), the result of the 5th iteration is also not returned, although it 
did it.  I know it is what the dictionary describes, but is there a way to get 
the result of the last iteration when the boxed form is used without applying 
the verb again?  It's useful when I have an costly verb and want to get to the 
last result when a loose tolerant comparison is used.


PS. a bug in j804 affects ^:(<_), so you need j805beta to try the above 
sentences.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to