1 21-FunctionalProg


Previous: 20-IteratorsGenerators.html

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

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

Not covered in lecture (optional)
* 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)
* https://realpython.com/instance-class-and-static-methods-demystified/
* https://www.python-course.eu/python3_class_and_instance_attributes.php

Next: 22-DataVis.html