Vocabulary/lcapdot

From J Wiki
Jump to navigation Jump to search

>> <<   Back to: Vocabulary Thru to: Dictionary

L. y Level Of

Rank Infinity -- operates on x and y as a whole -- WHY IS THIS IMPORTANT?



The greatest level of nesting of a boxed noun, or 0 if unboxed.

   L. 0$a:
0
   L. 1 2 3
0
   L. <,1
1
   L. (<,1),(<<,2)
2
   L. (<,1),(<<,2),(<<<,3)
3

Common Uses

Use boxopen to detect whether argument y is already boxed

boxopen=: <^:(L. = 0:)   NB. box y-arg if it is open or empty, but not otherwise

boxopen is a

  • Standard Library word(s) residing in the 'z'-locale
  • Defined in the factory script stdlib.ijs which is located in  ~system/main/stdlib.ijs
  • View the definition(s) in a JQt session by entering:  open '~system/main/stdlib.ijs'


Use These Combinations

Combinations using L. y that have exceptionally good performance include:

What it does Type;

Precisions;
Ranks

Syntax Variants;

Restrictions

Benefits;

Bug Warnings

Check boxing level x (< L.) y also <: > >: Stops processing y early if possible

Related Primitives

Level At (u L: n), Spread (u S: n)