Implement a function or algorithm to solve a practical coding challenge with simple, clean logic and edge-case handling.
Implement first_missing_positive(nums), which returns the smallest positive integer absent from the unsorted integer list nums. The function must modify the list in place and use constant extra space.
Input is a list of integers. Return one integer representing the smallest missing positive value.
def first_missing_positive(nums):