![](https://i0.wp.com/www.thecodehub.ie/news/wp-content/uploads/2020/09/image-4.png?resize=225%2C176&ssl=1)
Steve and I are back with Earlston Primary School in Scotland to talk about finding patterns, from the Quick Start to Code with Swift PDF from Apple.
We talk a lot about finding patterns and turning those patterns we use repeatedly into functions. Find out more on our mini-site for our extended EU Code Week sessions.
What’s in a Function?
A function is a way to group a set of commands you’ve deemed useful enough that you want to re-use. So to write a function we need to think about what problem we’re trying to solve.
![](https://i0.wp.com/www.thecodehub.ie/news/wp-content/uploads/2020/11/image.png?resize=512%2C368&ssl=1)
Your first pass may also not be your last! Often we’ll revisit code after solving a problem to see if we can improve on our original solution.
Unplugged
With Steve we work on turning left to turn right in the real world and we also play a game of “Dots.”
Come check out our session and get back to Swift Playgrounds with us!