J: A rational redesign of APL

[top]

  1. Functional, array-oriented.
  2. Belongs to APL family, but uses plain-ASCII characters only.
  3. Supports unique parameter-less "tacit" mode definition of function.
  4. Example: Prime number generation by two distinct algorithm(see APL, A+, K, Q'Nial, yorick version).

    primes =. [:(#~2:=[:+/0:=|/~)>:&i.
    
    sieve=. 3 : 0
      r=. y.^0.5
      s=. -.y.{.1
      p=. 0
      while. r>:p=. p+>:(p}.s)i.1 do.
        s=. 0 (<:}.p*>:i.<.y.%p)}s
      end.
      >:s#i.y.
    )
    

  5. References:

[top]