An interesting article! f=: 13 :'?y$0' A=:f 1000000 g=:>i.1: A g 0.5 2 g > i. 1: h=: 13 :'(x>y)i. x 1:y' A h 0.5 2 h > i. 1: ts=: [:(6!:2 , 7!:2)] NB. time and space (seconds and bytes) ts 'A g 0.5' 6.98413e_6 960 ts 'A h o.5' 0.00613388 960 NB. x (f g h) y evaluates as (x f y) g (x h y)
It took me a while to recognize that Roger was just timing the two versions of the identity for a fork. Linda -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of km Sent: Tuesday, May 14, 2013 2:49 PM To: [email protected] Cc: Programming forum Subject: Re: [Jprogramming] rosettacode Roger provides a motivation for capped fork in his Wiki essay Capped Fork: http://www.jsoftware.com/jwiki/Essays/Capped%20Fork?highlight=%28completenes s%29 He says, "When [: g h is interpreted as g@:h , it means that "everything" can be expressed as a fork (ordinary and capped)." I hope this teaser will make you eager to see his essay! --Kip Murray Sent from my iPad > On Mon, May 13, 2013 at 9:56 PM, Jose Mario Quintana > <[email protected]> wrote: > A teaser cap is the exception to the >> >> rule, [: is the only verb that is not invoked when is the leading >> verb in a fork, for no compelling reason (again, from my viewpoint). ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
