Basic Tips

Short indices operator

Indexing with an array allows finding the indexes of an item or subarray in an array:

[0,5,3,2,6,0][[0]]
> [0, 5]
[0,5,3,2,6,0][[0,5]]
> [0]

Piping this to | length allows a relatively efficient count of an item in an array.