Searches within a deque.
position behaves differently for arrays and strings:
-
If
haystackis an array,needlemust be a callable value. We return the index of the first element in the array for which(needle elem)returns a value other than#nor#f. If there is no such element, we return#n. -
If
haystackis a string,needlecan be either a character (in which case the index of the first matching character is returned) or a non-empty string (in which case the starting index of the first matching substring is returned).
When from is specified, it must be an integer index, which acts as the starting point
for the search.