# test7.rb require 'list' def test7 () my_list = [14, 198, 47, 918, 405, 578, 46] target = 405 position = 0 while ! (my_list == []) && head (my_list) != target my_list = tail (my_list) position = position + 1 end if my_list == [] puts -1 else puts position end return 0 end test7 ()