Dear J enthusiasts,

Let's assume I want to make sure the following structure of the noun is
delivered to function:
┌────┬────┬────────────────────┐
│num1  │num2 │┌───────────┬──────┐│
│           │          ││┌────┬────┐ │┌────┐││
│           │          │││lit1      │lit2      │ ││num1  │││
│           │          ││└────┴────┘ │└────┘││
│           │          │└───────────┴──────┘│
└────┴────┴────────────────────┘
so the one that can be instantiated like for example
(1;2;<('lit1';'lit2');<<11)

How would you write a check for that, so something checking:
(a) first box has number
(b) second box has number
(c) in third box there must be at least one box that could have either two
literal boxes or one numeral box.
(d) there must be three boxes described above.

You would wrote just 4 checks and combine them with *. or approach this
differently?

Many thanks and cheers,
Pawel
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to