At: http://www.jsoftware.com/help/jforc/loopless_code_i_verbs_have_r.htm#_Toc141157992
We see Henry discuss how dyadic + works. One key requirement for dyadic + in all cases is that there must be a common frame. Hence, the following is an error: ( i. 2 2 ) + (i. 3 3 ) |length error However, in: http://www.jsoftware.com/help/jforc/loopless_code_i_verbs_have_r.htm#_Toc141157993 Henry demonstrates: ( i. 2 2 ) , (i. 3 3 ) 0 1 0 2 3 0 0 1 2 3 4 5 6 7 8 and obviously the requirement for common prefix is not met. So the question becomes: what is the general algorithm for dyadic verb application? Which verb, "+" or "," is closer to the general algorithm? How and where are "hooks" inserted into this algorithm so that the algorithm can be "jettisoned" in favor of behavior peculiar to a particular verb? Just FYI, the algorithm for dyadic "+" (which I thought was the general dyadic application algorithm) is coded starting on line 112 here - http://hg.metaperl.com/redick?f=8d2f0d91211b;file=scheme/dyads/dyad-apply.scm;style=gitweb ... it works for all examples in J for C. But obviously it blows up when dyadic "," is passed to it. So the goal is to make changes to get both working and a generic dyadic application algorithm with proper callouts to respect certain verb peculiarities. -- View this message in context: http://www.nabble.com/J-for-C---generic-dyad-application-versus-verb-specific-tf4871837s24193.html#a13940484 Sent from the J General mailing list archive at Nabble.com. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
