1 21-FunctionalProg


1.1 Code

Code (to be stepped through in spyder3 and/or pudb3):
21-FunctionalProg/funcy_00_lambda.py
21-FunctionalProg/funcy_01a_map_filter_reduce.py
21-FunctionalProg/funcy_01b_mymap.py
21-FunctionalProg/funcy_02_decorators.py
21-FunctionalProg/funcy_03_functools.py

1.2 Screencasts

1.3 More syntactic sugar today

21-FunctionalProg/suga.jpg

1.4 Functional programming

… and advanced function manipulations.

1.4.1 Lambda functions, map, filter, reduce

https://book.pythontips.com/en/latest/lambdas.html
https://book.pythontips.com/en/latest/map_filter.html
https://medium.com/better-programming/how-to-replace-your-python-for-loops-with-map-filter-and-reduce-c1b5fa96f43a
https://realpython.com/python-lambda/
https://thepythonguru.com/python-lambda-function/
https://thepythonguru.com/python-builtin-functions/filter/
https://thepythonguru.com/python-builtin-functions/map/
https://thepythonguru.com/python-builtin-functions/reduce/
https://www.bogotobogo.com/python/python_fncs_map_filter_reduce.php
https://www.geeksforgeeks.org/python-lambda-anonymous-functions-filter-map-reduce/
https://www.learnpython.org/en/Map,_Filter,_Reduce
https://www.python-course.eu/python3_lambda.php
https://www.w3schools.com/python/python_lambda.asp

1.4.2 Function decorators

More syntactic sugar for higher order functions!

https://realpython.com/primer-on-python-decorators/
https://www.learnpython.org/en/Decorators
https://www.learnpython.org/en/Closures
https://www.python-course.eu/python3_decorators.php
https://www.python-course.eu/python3_implementing_a_property_decorator.php
https://www.python-course.eu/python3_memoization.php
https://www.python-course.eu/python3_properties.php

You can do multiple decoration:
https://blog.teclado.com/python-how-to-use-multiple-decorators-on-one-function/

1.4.3 Partial functions, functools

https://www.learnpython.org/en/Partial_functions
https://docs.python.org/3.8/library/functools.html

1.4.4 Re-visiting static and class methods

Not covered in lecture (optional OOP junk)
https://realpython.com/instance-class-and-static-methods-demystified/
https://www.python-course.eu/python3_class_and_instance_attributes.php