There are no "niladic functions" in J.  n v1 v2
is interpreted to mean  n"_ v1 v2  where n"_ is
a constant function with unbounded ranks whose
value is n .  This is documented in Section II f
of the dictionary.

http://www.jsoftware.com/help/dictionary/dictf.htm



----- Original Message -----
From: Raul Miller <[EMAIL PROTECTED]>
Date: Wednesday, March 7, 2007 8:22 am
Subject: Re: [Jprogramming] FizzBuzz

> On 3/7/07, ramacd <[EMAIL PROTECTED]> wrote:
> > Am I correct in saying that the documentation for Fetch says 
> nothing of
> > fetching from what is a train but what looks like a verb list. Some
> > experiments:
> >
> >   (0 {:: <:;];>:) 12
> > 11
> 
> I'm not sure I understand the question.  (Actually, I'm not
> sure you're asking a question.)
> 
> That said, in this case, the left argument for {:: is a boxed
> list of three integers
> 
>   (<:;];>:) 12
> +--+--+--+
> |11|12|13|
> +--+--+--+
>   0 {:: 11;12;13
> 11
> 
> Also, it might be worth noting that this is a train:
>   0 {:: <: ; ] ; >:
> 
> More specifically, it's a train of three forks:
>   0 {:: (<: ] (] ;>:))
> 
> When the left tine of a fork is a noun, it gets treated as a
> niladic function.
> 
> Nothing about this (other than the use of {:: as the center of
> the left-most fork) is specific to {:: -- that said, I don't know
> where in the dictionary the n v v fork is documented.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to