Hi Bo,

(,: , 1"1) is a fork in the (V V V) form and both 1"1 and 1: make the noun 1 
into a constant verb with the same result and so are interchangeable.


   t=: 1"1
   s=: 1:
   r=: 1
   4!:0 <'t'
3
   4!:0 <'s'
3
   4!:0 <'r'
0

The other alternative would be to turn this into a (N V V) fork by using ~ 
resulting in (1 ,~ ,:) …untested.

Cheers, bob

On 2012-12-21, at 8:49 AM, Bo Jacoby wrote:

> Thanks Brian!
> 
> You are perfectly right,   /   works and is nicer and shorter.
>     20 5 0(*`%/"2@(,: (%:@* -.))@((,: , 1"1) % +/@[))10
> 8 2 0
> 1 1 0
> 
> But J translates   /   into    ´:3 
>     *`%/"2@(,: (%:@* -.))@((,: , 1"1) % +/@[)
> *`%`:3"2@(,: (%:@* -.))@((,: , 1"1) % +/@[)
> 
> 
> I guess thats why, while developping the program, I thought that   ´:3   was 
> the proper way to do it. But as you are quite right I will change it.
> 
> Another character is saved by replacing   1"1  by   1:   It seems to work. I 
> don't quite understand why. 
>     20 5 0(*`%/"2@(,: (%:@* -.))@((,: , 1:) % +/@[))10
> 8 2 0
> 1 1 0
> 
> 
> - Bo
> 
> 
> 
> 
>> ________________________________
>> Fra: Brian Schott <schott.br...@gmail.com>
>> Til: programm...@jsoftware.com 
>> Sendt: 14:10 fredag den 21. december 2012
>> Emne: Re: [Jprogramming] Deduction, Induction, and Prediction.
>> 
>> Why do you use `:3 and not / in deduce?
>> I have always thought the former was ugly.
>> 
>> -- 
>> (B=) <-----my sig
>> Brian Schott
>> ----------------------------------------------------------------------
>> 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

Reply via email to