cap 5 - higher-order functions
cap. 5 - finalizando