bug-apl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Index-of function with structured left-argument


From: Elias Mårtenson
Subject: Index-of function with structured left-argument
Date: Tue, 14 Apr 2020 16:15:29 +0800

The ISO spec doesn't address what the index-of function should do when the left argument is not a scalar or a one-dimensional array.

GNU APL extends this, but I don't really understand in what way. How am I to interpret the output from this?

      (2 2 ⍴ 104 105 106 107) ⍳ (3 4 ⍴ 100+⍳100)
┏→━━━━━━━━━━━━━━━━━━━━━━┓
↓┏⊖┓   ┏⊖┓   ┏⊖┓   ┏⊖┓  ┃
┃┃0┃   ┃0┃   ┃0┃   ┃0┃  ┃
┃┗━┛   ┗━┛   ┗━┛   ┗━┛  ┃
┃┏→━━┓ ┏→━━┓ ┏→━━┓ ┏→━━┓┃
┃┃0 0┃ ┃0 1┃ ┃1 0┃ ┃1 1┃┃
┃┗━━━┛ ┗━━━┛ ┗━━━┛ ┗━━━┛┃
┃┏⊖┓   ┏⊖┓   ┏⊖┓   ┏⊖┓  ┃
┃┃0┃   ┃0┃   ┃0┃   ┃0┃  ┃
┃┗━┛   ┗━┛   ┗━┛   ┗━┛  ┃
┗∊━━━━━━━━━━━━━━━━━━━━━━┛

Regards,
Elias

reply via email to

[Prev in Thread] Current Thread [Next in Thread]