[Jprogramming] Tacit definition involving adverb argument
'Pascal Jasmin' via Programming
programming at jsoftware.com
Fri Jan 6 00:29:57 UTC 2017
(+/)`%`# 1 : ' ''`f g h'' =. m label_. (f g h) f.'
+/ % #
----- Original Message -----
From: Moon S <moon.aka.sun at gmail.com>
To: programming <programming at jsoftware.com>
Sent: Thursday, January 5, 2017 7:26 PM
Subject: Re: [Jprogramming] Tacit definition involving adverb argument
Ah! The special form for }
x (v0`v1`v2)} y
Great!
What about a user-defined adverb? If I define an adverb to pretend I
can have three parameters.
On Fri, Jan 6, 2017 at 1:53 AM, 'Pascal Jasmin' via Programming
<programming at jsoftware.com> wrote:
> 11 22 33&( 0:`(<:@])`[}) 2
> 11 0 33
>
>
> ----- Original Message -----
> From: Moon S <moon.aka.sun at gmail.com>
> To: programming <programming at jsoftware.com>
> Sent: Thursday, January 5, 2017 6:36 PM
> Subject: [Jprogramming] Tacit definition involving adverb argument
>
> Is there a tacit definition of such a verb? Is there a way to pass a
> value to the adverb?
>
> f =: 3 : '0 (<:y)} 11 22 33'
>
> f 1
> 0 22 33
> f 2
> 11 0 33
>
>
> PS. Also, I couldn't suspect that besides a usual definition of dyad
> adverb such as
>
> 1 : ('';':';'...x...m...y...') NB. explicit defs inside
>
> there's also a shorter way:
>
> 1 : '...[...x...]...' NB. tacit defs inside
>
> Of course the reading of The Phrases is very useful... but so hard!
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list