position

Returns the key at which a particular value occurs in a sequence.

If predicate is supplied, position uses it as an equivalence predicate for comparing sequence’s elements to value.  It should take two objects and return a boolean.  The default predicate used is ==.

The skip argument is interpreted as it is by Dylan’s find-key function.  position ignores the first skip elements that match value, and if skip or fewer elements satisfy predicate, it returns #f.

Exported from

Modifiers

open

Arguments

sequenceAn instance of <sequence>.
valueAn instance of <object>.
predicate:An instance of <function>.  Defaults to ==.
skip:An instance of <integer>.  Defaults to 0.

Values

keyAn instance of type-union(<integer>, <false>).
Returns the key at which a particular value occurs in a sequence.
Compares two objects for identity.
Returns the key in a collection such that the corresponding collection element satisfies a predicate.
The common-dylan module.
Miscellaneous extensions to the Dylan language.
The class of collections whose keys are consecutive integers starting from zero.
The class of all Dylan objects.
The class of objects that can be applied to arguments.
The class of integers.