I guess `foldl1 min` could be replaced with `minimum` here.