Functional Programming - Scala

Functional Programming in Scala – Week 5

Week 5 – Lists, investigate a ‘fundamental’ data structure in functional programming. The recursive nature of lists in Scala makes them quite different from arrays. This tied in with the power of pattern matching and the recursive nature of function programming gives credibility to the ‘fundamental’ label.

Pattern matching on lists is a powerful tool
Pattern matching on lists is a powerful tool

Sorting of lists was covered in good detail and in addition to list1.head and list1.tail more functions were revealed:

Some key functions for lists

Week 5 Lectures

Week 4 and Week 6 assignments were considered higher work load than others thus there was no assignment for week 5

Leave a Reply

Your email address will not be published. Required fields are marked *