I try to use =. when I can so I do not forget to make names local. In a script while testing before putting the line into a verb it is easy to send either one line at a time with ctrl+r or several lines with ctrl+e
These kinds of names I do not want to have as globals in a system. 2011/10/4 Raul Miller <[email protected]> > On Tue, Oct 4, 2011 at 4:52 AM, Bo Jacoby <[email protected]> wrote: > > Verbs for deduction and induction are defined like this. > > > > a =. *`%`:3"2 > > b =. ,: (%:@* -.) > > c =. (,: , 1:) % +/@] > > deduc =. a@b@c f. > > T =. -@(+ #) > > induc =. (T@}: , }.)@(T~ deduc T) f. > > This looks fun. > > I do have some cosmetic suggestions. > > First, I prefer =: over =. for definitions that I am going to use, > because =. definitions in a script I load from file vanish before I > can use them. > > Second, I would probably use / instead of `:3 -- I know that J will > convert gerund/ to gerund`:3 but / is still more concise (and, for me, > saves a round trip to the vocabulary page -- but that might not be the > case for someone else). > > Also, it's interesting (and educational) to try to put names to each > of the intermediate results that arise in this kind of computation. > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Björn Helgason, Verkfræðingur Fornustekkum II 781 Hornafirði, t-póst: [email protected] gsm: +3546985532 twitter: @flugfiskur http://groups.google.com/group/J-Programming Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans góður kennari getur stigið á tær án þess að glansinn fari af skónum /|_ .-----------------------------------. ,' .\ / | Með léttri lund verður | ,--' _,' | Dagurinn í dag | / / | Enn betri en gærdagurinn | ( -. | `-----------------------------------' | ) | (\_ _/) (`-. '--.) (='.'=) ♖♘♗♕♔♙ `. )----' (")_(") ☃☠ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
