input: from typing import List
  
  def swap_elements(numbers: List[float]) -> List[float]:
      """ Swap the positions of the first and last elements in the list if the first element is greater than the last element.
      >>> swap_elements([1.0, 2.0, 3.0])
      [3.0, 2.0, 1.0]
      >>> swap_elements([4.0, 2.0, 3.0, 1.0])
      [1.0, 2.0, 3.0, 4.0]
      """
output:     if len(numbers) < 2:
          return numbers
      if numbers[0] > numbers[-1]:
          numbers[0], numbers[-1] = numbers[-1], numbers[0]
      return numbers