Teaching Functional Programming at KS5
Teacher,
Cat enthusiast
- The 2022 End of Year Website Update - 01/01/2023
- Celebrating Ada Lovelace day - 10/10/2022
- Website update 5/9/22 - 05/09/2022
While attending ExaBytes18 I was introduced to a very useful way to teach Functional Programming to KS5 students using the website repl.it and the Haskell programming language.
repl.it is not just a useful website for programming Haskell, you can program many other languages on there as well including Python, QBasic, Ruby, C#, HTML etc so an excellent resource in itself.
One thing that I would warn users about – repl.it does have a habit of losing your progress. For example you may have declared something and try to reference it on the line below for it to throw an error or just freeze indicating that it is not there anymore. My advice is to keep tabs on where you are up to in your program in case you need to redo any of your code.
Having not used Haskell before I found it fairly easy to pick up and use. The language does not particularly use much syntax so this is one less thing your students have to worry about. The language and construction is fairly simple and should make sense to students though, like every program language, there are a few oddities that they will need to become accustomed with.
A good website for learning how to program Haskell is – http://learnyouahaskell.com/
You can purchase the book or you can read the book for free on the website as well. In terms of KS5, students don’t have to know Haskell inside and out just be able to recognise a few simple commands and know the theory behind them but the website could fill in a few blanks if they are the type of student that needs to know why something is happening!