Function index of value n in x with current index i

helper for the find number function that tracks the current stack index in i while looking for n in x

Format:

index of value n in x with current index i

Input:

list x -
any n -
number i -

Output:

any - None

Properties that reference this function:

index of value val in els = index of value val in els with current index 0 (Find Node With Value)

Conditional properties that reference this function:

  • if el = val, then index of value val in [ node (el, left, right), remain ] with current index idx = idx (link)
  • if el = val, then index of value val in [ node (el, w, p), remain ] with current index idx = idx (link)
  • if not (el = val), then index of value val in [ node (el, left, right), remain ] with current index idx = index of value val in remain with current index (idx + 1) (link)
  • if not (el = val), then index of value val in [ node (el, w, p), remain ] with current index idx = index of value val in remain with current index (idx + 1) (link)


Comments

Please log in to add comments