An elementary approach to functions