Hi Bug apl,
Does anyone have a recommendation on how to calculate `result` assuming you have `b` and `subsections` of any length?
subsections
┌→─────────────────────────────────────────────────────────────────────┐
│┌→──────────────────────────────────┐ ┌→─────────────────────────────┐│
││┌→──────┐ ┌→────┐ ┌→──────┐ ┌→────┐│ │┌→──────┐ ┌→──┐ ┌→──────┐ ┌→─┐││
│││+sub1:|│ │bloop│ │+sub2:|│ │blech││ ││+sub3:|│ │tap│ │+sub4:|│ │yo│││
││└───────┘ └─────┘ └───────┘ └─────┘│ │└───────┘ └───┘ └───────┘ └──┘││
│└∊──────────────────────────────────┘ └∊─────────────────────────────┘│
└∊∊────────────────────────────────────────────────────────────────────┘
b
┌→──────────────────┐
│┌→──────┐ ┌→──────┐│
││1 1 2 2│ │1 1 2 2││
│└───────┘ └───────┘│
└∊──────────────────┘
(1⊃b)⊂1⊃subsections
┌→──────────────────────────────────────┐
│┌→────────────────┐ ┌→────────────────┐│
││┌→──────┐ ┌→────┐│ │┌→──────┐ ┌→────┐││
│││+sub1:|│ │bloop││ ││+sub2:|│ │blech│││
││└───────┘ └─────┘│ │└───────┘ └─────┘││
│└∊────────────────┘ └∊────────────────┘│
└∊∊─────────────────────────────────────┘
result←((1⊃b)⊂1⊃subsections) ((2⊃b)⊂2⊃subsections)
┌→─────────────────────────────────────────────────────────────────────────────┐
│┌→──────────────────────────────────────┐ ┌→─────────────────────────────────┐│
││┌→────────────────┐ ┌→────────────────┐│ │┌→──────────────┐ ┌→─────────────┐││
│││┌→──────┐ ┌→────┐│ │┌→──────┐ ┌→────┐││ ││┌→──────┐ ┌→──┐│ │┌→──────┐ ┌→─┐│││
││││+sub1:|│ │bloop││ ││+sub2:|│ │blech│││ │││+sub3:|│ │tap││ ││+sub4:|│ │yo││││
│││└───────┘ └─────┘│ │└───────┘ └─────┘││ ││└───────┘ └───┘│ │└───────┘ └──┘│││
││└∊────────────────┘ └∊────────────────┘│ │└∊──────────────┘ └∊─────────────┘││
│└∊∊─────────────────────────────────────┘ └∊∊────────────────────────────────┘│
└∊∊∊───────────────────────────────────────────────────────────────────────────┘
⍝⍝⍝
I thought it would have been as simple as b⊂subsections
because they are the same length, but that also yields an error.
b⊂subsections
DOMAIN ERROR
b⊂subsections
^ ^
Any suggestions welcomed,
Alex