Simple examples: Difference between revisions
Jump to navigation
Jump to search
m (Examples category) |
m (→Method B) |
||
Line 150: | Line 150: | ||
{{Works in|all APLs}} | {{Works in|all APLs}} | ||
==== Method B ==== | ==== Method B ==== | ||
Alternatively, we can utilise that if the [Index Of]] function <source lang=apl inline>⍳</source> doesn't find what it is looking for, it returns the next index after the last element in the the lookup array: | Alternatively, we can utilise that if the [[Index Of]] function <source lang=apl inline>⍳</source> doesn't find what it is looking for, it returns the next index after the last element in the the lookup array: | ||
<source lang=apl> | <source lang=apl> | ||
'ABBA'⍳'ABC' | 'ABBA'⍳'ABC' |