Code snippet for first approach to function modelling.