|  | @@ -1,6 +1,7 @@
 | 
											
												
													
														|  |  const char *VHELP =\
 |  |  const char *VHELP =\
 | 
											
												
													
														|  |  ":  monadic const         create a function that always yields x" "\n"\
 |  |  ":  monadic const         create a function that always yields x" "\n"\
 | 
											
												
													
														|  |  ":  dyadic  bind          bind y to symbol x" "\n"\
 |  |  ":  dyadic  bind          bind y to symbol x" "\n"\
 | 
											
												
													
														|  | 
 |  | +":: monadic unbind        unbind symbol x" "\n"\
 | 
											
												
													
														|  |  ":: dyadic  obverse       insert inverse for x" "\n"\
 |  |  ":: dyadic  obverse       insert inverse for x" "\n"\
 | 
											
												
													
														|  |  "+  monadic flip          transpose matrix" "\n"\
 |  |  "+  monadic flip          transpose matrix" "\n"\
 | 
											
												
													
														|  |  "+  dyadic  plus          add numbers" "\n"\
 |  |  "+  dyadic  plus          add numbers" "\n"\
 | 
											
										
											
												
													
														|  | @@ -57,7 +58,8 @@ const char *VHELP =\
 | 
											
												
													
														|  |  ">: dyadic  nudgeright    shift elts of y to the right filling gap with x" "\n"\
 |  |  ">: dyadic  nudgeright    shift elts of y to the right filling gap with x" "\n"\
 | 
											
												
													
														|  |  ",  monadic enlist        put x into 1-elt array" "\n"\
 |  |  ",  monadic enlist        put x into 1-elt array" "\n"\
 | 
											
												
													
														|  |  ",  dyadic  join          concat x and y" "\n"\
 |  |  ",  dyadic  join          concat x and y" "\n"\
 | 
											
												
													
														|  | -",. monadic enfile        ame as , enlist but with infinite rank, ,.1 2 3 is (,1),:(,2),:(,3)" "\n"\
 |  | 
 | 
											
												
													
														|  | 
 |  | +",. monadic enfile        same as , enlist but with infinite rank, ,.1 2 3 is (,1),:(,2),:(,3)" "\n"\
 | 
											
												
													
														|  | 
 |  | +",. dyadic  enpair        put x and y into 2-elt array" "\n"\
 | 
											
												
													
														|  |  "#  monadic count         yield count of elts of x" "\n"\
 |  |  "#  monadic count         yield count of elts of x" "\n"\
 | 
											
												
													
														|  |  "#  dyadic  take          take x first elts of y (or last if x < 0)" "\n"\
 |  |  "#  dyadic  take          take x first elts of y (or last if x < 0)" "\n"\
 | 
											
												
													
														|  |  "#. monadic where         #.0 0 1 0 1 0 is 2 4" "\n"\
 |  |  "#. monadic where         #.0 0 1 0 1 0 is 2 4" "\n"\
 | 
											
										
											
												
													
														|  | @@ -83,10 +85,13 @@ const char *VHELP =\
 | 
											
												
													
														|  |  "@  monadic abs           |x|" "\n"\
 |  |  "@  monadic abs           |x|" "\n"\
 | 
											
												
													
														|  |  "@  dyadic  at            pick elts from x by indices from y" "\n"\
 |  |  "@  dyadic  at            pick elts from x by indices from y" "\n"\
 | 
											
												
													
														|  |  "@. monadic shuffle       shuffle elts of x" "\n"\
 |  |  "@. monadic shuffle       shuffle elts of x" "\n"\
 | 
											
												
													
														|  | -"@. dyadicn member        check whether x is in y" "\n"\
 |  | 
 | 
											
												
													
														|  | 
 |  | +"@. dyadic  member        check whether x is in y" "\n"\
 | 
											
												
													
														|  | 
 |  | +"@: monadic infix         shortcut for }{:" "\n"\
 | 
											
												
													
														|  | 
 |  | +"@: dyadic  indexof       yield index of x in y or #y if x not in y" "\n"\
 | 
											
												
													
														|  |  "{  monadic head          first two elts of x, same as 2#" "\n"\
 |  |  "{  monadic head          first two elts of x, same as 2#" "\n"\
 | 
											
												
													
														|  |  "{  dyadic  bin           bin search, e.g. 1 3 5 7 9{8 9 0 yields 3 4 -1" "\n"\
 |  |  "{  dyadic  bin           bin search, e.g. 1 3 5 7 9{8 9 0 yields 3 4 -1" "\n"\
 | 
											
												
													
														|  |  "{. monadic tail          last elt of x" "\n"\
 |  |  "{. monadic tail          last elt of x" "\n"\
 | 
											
												
													
														|  | 
 |  | +"{. dyadic  cut           1 3{.!.5 yields 2 3,:4 5" "\n"\
 | 
											
												
													
														|  |  "{: monadic prefixes      prefixes of x, same as |}.\\." "\n"\
 |  |  "{: monadic prefixes      prefixes of x, same as |}.\\." "\n"\
 | 
											
												
													
														|  |  "{: dyadic  shl           x << y" "\n"\
 |  |  "{: dyadic  shl           x << y" "\n"\
 | 
											
												
													
														|  |  "}  monadic behead        all elts of x except first, same as 1_" "\n"\
 |  |  "}  monadic behead        all elts of x except first, same as 1_" "\n"\
 | 
											
										
											
												
													
														|  | @@ -119,10 +124,12 @@ const char *VHELP =\
 | 
											
												
													
														|  |  "";
 |  |  "";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const char *V2HELP =\
 |  |  const char *V2HELP =\
 | 
											
												
													
														|  | 
 |  | +"d. dyadic  delete        delete elt from y by index x" "\n"\
 | 
											
												
													
														|  |  "p. monadic print         print x" "\n"\
 |  |  "p. monadic print         print x" "\n"\
 | 
											
												
													
														|  |  "P. monadic println       print x and a \\n" "\n"\
 |  |  "P. monadic println       print x and a \\n" "\n"\
 | 
											
												
													
														|  | -"f. monadic selfref1      monadic reference to current function or rhs of bind" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f. dyadic  selfref2      dyadic reference to current function or rhs of bind" "\n"\
 |  | 
 | 
											
												
													
														|  | 
 |  | +"c. monadic putch         print char x" "\n"\
 | 
											
												
													
														|  | 
 |  | +"s. monadic selfref1      monadic reference to current function or rhs of bind" "\n"\
 | 
											
												
													
														|  | 
 |  | +"s. dyadic  selfref2      dyadic reference to current function or rhs of bind" "\n"\
 | 
											
												
													
														|  |  "F. monadic read          read file (x=0 to read stdin)" "\n"\
 |  |  "F. monadic read          read file (x=0 to read stdin)" "\n"\
 | 
											
												
													
														|  |  "F. dyadic  write         write file (y=0 to write to stderr)" "\n"\
 |  |  "F. dyadic  write         write file (y=0 to write to stderr)" "\n"\
 | 
											
												
													
														|  |  "t. monadic type          type of x, array=0, verb=1, symbol=2, number=3, char=4, nil=5, udf=6" "\n"\
 |  |  "t. monadic type          type of x, array=0, verb=1, symbol=2, number=3, char=4, nil=5, udf=6" "\n"\
 | 
											
										
											
												
													
														|  | @@ -130,40 +137,48 @@ const char *V2HELP =\
 | 
											
												
													
														|  |  "r. dyadic  roll          roll xdy (note: y is 0-based, so >xr.y for 1-based)" "\n"\
 |  |  "r. dyadic  roll          roll xdy (note: y is 0-based, so >xr.y for 1-based)" "\n"\
 | 
											
												
													
														|  |  "e. monadic eval          eval expression, yields udf on parse error" "\n"\
 |  |  "e. monadic eval          eval expression, yields udf on parse error" "\n"\
 | 
											
												
													
														|  |  "i. monadic import        load and eval source file" "\n"\
 |  |  "i. monadic import        load and eval source file" "\n"\
 | 
											
												
													
														|  | 
 |  | +"i. dyadic  foreign       call external function (lhs is array of arguments), e.g. .5i.'libm.so:dd:sin'" "\n"\
 | 
											
												
													
														|  |  "y. monadic system        exec system command (yields output)" "\n"\
 |  |  "y. monadic system        exec system command (yields output)" "\n"\
 | 
											
												
													
														|  |  "y. dyadic  system2       exec system command with input" "\n"\
 |  |  "y. dyadic  system2       exec system command with input" "\n"\
 | 
											
												
													
														|  |  "E. monadic exit          exit with exit code" "\n"\
 |  |  "E. monadic exit          exit with exit code" "\n"\
 | 
											
												
													
														|  | 
 |  | +"L. monadic lines         shortcut for (4t.10)]:" "\n"\
 | 
											
												
													
														|  | 
 |  | +"L. dyadic  tackleft      prepend x to y" "\n"\
 | 
											
												
													
														|  | 
 |  | +"R. dyadic  tackright     append x to y" "\n"\
 | 
											
												
													
														|  | 
 |  | +"v. monadic value         get value of var x (udf if not defined)" "\n"\
 | 
											
												
													
														|  | 
 |  | +"x. monadic show          identity for strings, same as $ repr for other" "\n"\
 | 
											
												
													
														|  | 
 |  | +"x. dyadic  rematch       match str y with regex (PCRE) x" "\n"\
 | 
											
												
													
														|  | 
 |  | +"X. dyadic  extract       extract all matches of regex x from y" "\n"\
 | 
											
												
													
														|  |  "";
 |  |  "";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const char *AHELP =\
 |  |  const char *AHELP =\
 | 
											
												
													
														|  | -"f\"       each          >\"1 2 3 yields 2 3 4" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf\"      merge         1 2 3,\"a b c yields (1,.a),:(2,.b),:(3,.c)" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f\".      eachprior     -\".1 2 2 3 5 6 yields 1 0 1 2 1" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf\".     eachpriorwith 0-\".1 2 2 3 5 6 yields 1 1 0 1 2 1" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f/       fold          +/1 2 3 yields 6" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf/      foldwith      1+/1 2 3 yields 7" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f\\       scan          +\\1 2 3 yields 1 3 6" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf\\      scanwith      1+\\1 2 3 yields 1 2 4 7" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f/.      converge      1;_/.1 2 3 yields ()" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f\\.      converges     1;_\\.1 2 3 yields 1 2 3,:2 3,:(,3),:()" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf/.     eachright     1-/.1 2 3 yields 0 1 2" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf\\.     eachleft      1-\\.1 2 3 yields 0 -1 -2" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f\":      rank          #\":1 2 3$1 yields 3 3, #\":inf 2 3$1 yields 1 1 1,:1 1 1" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf\":     rank          1 2 3 *:\":1 1 2 3 yields (,1),:2 2,:3 3 3" "\n"\
 |  | 
 | 
											
												
													
														|  | -"n`       amend         'gw'0 3`'cross' yields 'grows'" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f&.      filter        >;0&.-2!.2 yields 1 2, basically shortcut for ]#.f" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f/:      span          =;' '/:'x y z' yields (,'x'),:(,'y'),:(,'z')" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf/:     stencil       3+//:!10 yields 3 6 9 12 15 18 21 24, shortcut for f\"x|:" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f;.      reflex        *;.5 yields 25, 5%;.2 yields 0.4" "\n"\
 |  | 
 | 
											
												
													
														|  | 
 |  | +"f\"         each          >\"1 2 3 yields 2 3 4" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf\"        merge         1 2 3,\"a b c yields (1,.a),:(2,.b),:(3,.c)" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f\".        eachprior     -\".1 2 2 3 5 6 yields 1 0 1 2 1" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf\".       eachpriorwith 0-\".1 2 2 3 5 6 yields 1 1 0 1 2 1" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f/         fold          +/1 2 3 yields 6" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf/        foldwith      1+/1 2 3 yields 7" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f\\         scan          +\\1 2 3 yields 1 3 6" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf\\        scanwith      1+\\1 2 3 yields 1 2 4 7" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f/.        converge      1;_/.1 2 3 yields ()" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f\\.        converges     1;_\\.1 2 3 yields 1 2 3,:2 3,:(,3),:()" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf/.       eachright     1-/.1 2 3 yields 0 1 2" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf\\.       eachleft      1-\\.1 2 3 yields 0 -1 -2" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f\":        rank          #\":1 2 3$1 yields 3 3, #\":inf 2 3$1 yields 1 1 1,:1 1 1" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf\":       rank2         1 2 3 *:\":1 1 2 3 yields (,1),:2 2,:3 3 3" "\n"\
 | 
											
												
													
														|  | 
 |  | +"n`         amend         'gw'0 3`'cross' yields 'grows'" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f&.        filter        >;0&.-2!.2 yields 1 2, basically shortcut for ]#.f" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f/:        span          =;' '/:'x y z' yields (,'x'),:(,'y'),:(,'z')" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf/:       stencil       3+//:!10 yields 3 6 9 12 15 18 21 24, shortcut for f\"x|:" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f;.        reflex        *;.5 yields 25, 5%;.2 yields 0.4" "\n"\
 | 
											
												
													
														|  |  "";
 |  |  "";
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  |  const char *CHELP =\
 |  |  const char *CHELP =\
 | 
											
												
													
														|  | -"f;g      bond      */;!.5 yields 120, +;1 5 yields 6, 5;- 1 yields 4" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f?.x     pick      >;5?.((2*),:<)\"3 6 yields 6 5" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f?:F     while     <;5?:>0 yields 5" "\n"\
 |  | 
 | 
											
												
													
														|  | -"n?:f     repeat    5?:*;2 1 yields 32" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f&:F     if        1+&:+2 yields 2" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f;:F     monaddyad -;:+5 yields -5, 1-;:+5 yields 6" "\n"\
 |  | 
 | 
											
												
													
														|  | 
 |  | +"f;g        bond          */;!.5 yields 120, +;1 5 yields 6, 5;- 1 yields 4" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f?.x       pick          >;5?.((2*),:<)\"3 6 yields 6 5" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f?:F       while         <;5?:>0 yields 5" "\n"\
 | 
											
												
													
														|  | 
 |  | +"n?:f       repeat        5?:*;2 1 yields 32" "\n"\
 | 
											
												
													
														|  | 
 |  | +"a\\:f       collect       same as while/repeat, but yields array of intermediate iterations" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f&:F       if            1+&:+2 yields 2" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f;:F       monaddyad     -;:+5 yields -5, 1-;:+5 yields 6" "\n"\
 | 
											
												
													
														|  |  "";
 |  |  "";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const char *IHELP =\
 |  |  const char *IHELP =\
 | 
											
										
											
												
													
														|  | @@ -171,10 +186,10 @@ const char *IHELP =\
 | 
											
												
													
														|  |  "\n"\
 |  |  "\n"\
 | 
											
												
													
														|  |  "f::~f  obverse  define inverse ~f for f" "\n"\
 |  |  "f::~f  obverse  define inverse ~f for f" "\n"\
 | 
											
												
													
														|  |  "\n"\
 |  |  "\n"\
 | 
											
												
													
														|  | -"f-:x   inverse  ~fx" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf-:y  inverse  (~fx)~f~fx" "\n"\
 |  | 
 | 
											
												
													
														|  | -"f^:Fx  under    ~FfFx" "\n"\
 |  | 
 | 
											
												
													
														|  | -"xf^:Fx under    ~F(Fx)f(Fx)" "\n"\
 |  | 
 | 
											
												
													
														|  | 
 |  | +"f-:x       inverse       ~fx" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf-:y      inverse2      (~fx)~f~fx" "\n"\
 | 
											
												
													
														|  | 
 |  | +"f^:Fx      under         ~FfFx" "\n"\
 | 
											
												
													
														|  | 
 |  | +"xf^:Fx     under2        ~F(Fx)f(Fx)" "\n"\
 | 
											
												
													
														|  |  "";
 |  |  "";
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  const char *SHELP =\
 |  |  const char *SHELP =\
 | 
											
										
											
												
													
														|  | @@ -185,6 +200,9 @@ const char *SHELP =\
 | 
											
												
													
														|  |  "'a'%2                     / = nan, nan used to denote illegal numeric operation" "\n"\
 |  |  "'a'%2                     / = nan, nan used to denote illegal numeric operation" "\n"\
 | 
											
												
													
														|  |  "+1 2 3                    / = udf, attempt to transpose flat vector, udf/undefined used to denote illegal operation" "\n"\
 |  |  "+1 2 3                    / = udf, attempt to transpose flat vector, udf/undefined used to denote illegal operation" "\n"\
 | 
											
												
													
														|  |  "5 5.5 -5 42               / number (double-precision floats)" "\n"\
 |  |  "5 5.5 -5 42               / number (double-precision floats)" "\n"\
 | 
											
												
													
														|  | 
 |  | +"1`000 1`000`000           /" "\n"\
 | 
											
												
													
														|  | 
 |  | +".5 .429                   /" "\n"\
 | 
											
												
													
														|  | 
 |  | +"0xff 0o4 0b0101           /" "\n"\
 | 
											
												
													
														|  |  "nan inf                   /" "\n"\
 |  |  "nan inf                   /" "\n"\
 | 
											
												
													
														|  |  "'a' 'b' 'g'               / chars (bytes)" "\n"\
 |  |  "'a' 'b' 'g'               / chars (bytes)" "\n"\
 | 
											
												
													
														|  |  "4t.0                      / 0 NUL byte" "\n"\
 |  |  "4t.0                      / 0 NUL byte" "\n"\
 |