code: def do_last(environment, seq):
      
      try:
          return next(iter(reversed(seq)))
      except StopIteration:
          return environment.undefined('No last item, sequence was empty.')
docs: Return the last item of a sequence.