Pascal (and Joe), I had noticed your witchcraft comment before and was impressed then. Today I noticed in another thread for day 5 of advent... where Joe referenced the byte code interpreter, the witch crafted definition of the verb func. I don't think I noticed before the leftmost verb left ([) in that line, perhaps because I focused on the fact the focus verb had only one ')' for two separate applications of definition (:). That is really creative and may be the reason only one ')' is required.
doc=.[(y,'_doc')=: 0 : 0 Btw, I tried to test out my theory of the need for the [ by redefining func without the [, but I was unable to exercise this new version of func because I could not understand how. What verb initializes all the calls like func '...'? On Fri, Nov 13, 2015 at 3:51 PM, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> wrote: > This is some awesome witchcraft, > > > func=: 3 : 0 > doc=.[(y,'_doc')=: 0 : 0 > lines=.LF cut doc > 0!:0 > {: lines > examples=.[(y,'_examples')=:3 }. each (#~ (<'ex:') E. 3 {. each [) lines > assert each ". each examples > '' > ) > > This is the witchcraft line > > doc=.[(y,'_doc')=: 0 : 0 > > it reuses the function's own closing ) > > -- (B=) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm