Teaching mathematical functions in primary and middle school : An approach based on neo-piagetian theory