module Hamster::List

def find_index

def find_index
  return nil unless block_given?
  i = 0
  list = self
  loop do
    return nil if list.empty?
    return i if yield(list.head)
    i += 1
    list = list.tail
  end
end