index_of¶
Description¶
@index_of(x, y)
find each item from x in y:
- return index, if
found - return the length of y, if
not found
Note: Indexing starts from 0
Type Rules¶
High-level
Real , Real -> i64
str , str -> i64
sym , sym -> i64
_ , _ -> domain error
Future Work
Support the search between three string types: char, symbol, and string
Table with details (See type alias)
Shape Rules¶
Examples¶
@index_of((3,4):i32, (4,9,16):i32)
(3,0):i32