For some reason, I remember there was an easier way to get an adverb to notice whether it had an m or u parameter, but I can't recall if that was the case, or how to do it. Is there an easier way to write the adverb below? isNoun =: (0 = 4!:0 ( :: 0:))@:< 2 (1 : 'if. isNoun ''u'' do. u else. u y end.') 3 2 +: (1 : 'if. isNoun ''u'' do. u else. u y end.') 3 6 '+: y' (1 : 'if. isNoun ''u'' do. (3 : u) y else. u y end.') 3 6 '+: y' (1 : 'if. isNoun ''u'' do. u =. (13 : u) end. u ') 3 NB. TIL you can add code after 'end.' on same line. 6 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
- [Jprogramming] Tacit recursion without $: Jose Mario Quintana
- Re: [Jprogramming] Tacit recursion without $: Don Guinn
- Re: [Jprogramming] Tacit recursion without $: Linda Alvord
- Re: [Jprogramming] Tacit recursion without $: Jose Mario Quintana
- Re: [Jprogramming] Tacit recursion withou... Linda Alvord
- Re: [Jprogramming] Tacit recursion without $: Linda Alvord
- [Jprogramming] best way to write modifier tha... Pascal Jasmin
- Re: [Jprogramming] best way to write modi... Dan Bron
- Re: [Jprogramming] best way to write ... Dan Bron
- Re: [Jprogramming] best way to write ... Pascal Jasmin
- Re: [Jprogramming] best way to write modi... Dan Bron
- Re: [Jprogramming] best way to write ... Pascal Jasmin
- Re: [Jprogramming] Tacit recursion without $: Dan Bron
- Re: [Jprogramming] Tacit recursion without $: Thomas Costigliola
- Re: [Jprogramming] Tacit recursion without $: Jose Mario Quintana
- Re: [Jprogramming] Tacit recursion withou... Jose Mario Quintana