Q100: Why there is special form for fork (n v v) (3=#), but no special form for hook (n v) or (v n) (3+)?
Sorry, I cannot find "_ in dictionaty. Why do we need @ at all, if it possible to emulate it with [: and trains? Regards, On Thu, Mar 22, 2012 at 12:03 PM, Alexander Epifanov <[email protected]> wrote: > Just some notes for me after first mail: > > [: - cool thing, but I do not understand if it is possible to > implement such function in haskell. Is it special form? > > n v v - special form, that is why 3=# works :) > > I wrote "find 3 unique digit numbers" with [: > (]#~([:(3=#*.[:*./~:)":)"0) ns > > Looks good, and it is easier than @, because there are much less brackets. > but if I understand correct where no different between @ and fork with [: . > That is why there are two ways to write the same things, hard to > decide which is better? > > If I understand correct, it is possible to write in explicit style > with 3 : '' only, which inverynot easy, something like 3 :'3 :''3 > :'''y'''": y''"0 y' ns. That is why most of the time it is not correct > style for J. > > Regards, -- Regards, Alexander. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
