Even-indexed elements#
Write a function evens
that extracts the even-indexed elements from a list, i.e., ['a', 'b', 'c', 'd']
will yield ['a', 'c']
. It should return the empty list when given the empty list.
Write a function evens
that extracts the even-indexed elements from a list, i.e., ['a', 'b', 'c', 'd']
will yield ['a', 'c']
. It should return the empty list when given the empty list.