from typing import List


def inrange(value: float, range_: List[float]) -> bool:
    """
    Tests whether value lies within (or is equal to either)
    the first and last values of the range array.
    """
    return min(range_[:2]) <= value <= max(range_[:2])