This must be in the for, why its error is pattern matched ?