Atom - w - Index Of Sublist

Characters: w

Tags: array , number

Arity: dyadic

This atom is dyadic, which means it takes two arguments.

Functionality

Find the first index of y as a sublist in list x, or 0 if the sublist is not present.

Details

Automatically casts both arguments to singleton lists if needed. This takes the element on the right and the list on the left, which is opposite of (Sublist Occurs). If you want to check if a sublist exists in a list and want the list on the left, consider using this instead of ẇ@ - even though it returns the index and not a boolean value, since Jelly is 1-indexed, 0, the value returned if the element is not found, is the only falsy output, and thus indicates if the element is in the list.