This is part of another computer-science tutorial I gave at the Oxford Institute. The idea was to use Python to demonstrate that in programming, functions can be as tangible as numbers, strings, or dates: that they can be assigned to variables, passed to other functions, returned from functions. In short, they enjoy all the privileges that other data does. They are “first-class values”.
Over the summer, I taught computer science to post-GCSE students at the Oxford Institute. Some of the students wanted to know about computer graphics and how to program animations. Could I find a way to do this without losing them amongst the complexities of Java method syntax and graphics libraries? As it happens, I’d come across a language called Pyret, designed specifically for teaching. I decided to try it.