JCL

FEUP/DEI & INESC TEC

User Tools

Site Tools


teach:fpro:lectures:17

LE17: 14/12/2020

Master in Informatics and Computing Engineering
Programming Fundamentals
Instance: 2020/2021


Lecture #17 :: 14/12/2020

Goals

By the end of this class, the student should be able to:

  • Describe the use higher-order functions
  • Describe the use nested functions and closures
  • Describe the use function currying and uncurrying
  • Describe the use Partial function application
  • Describe the use the operators available in Python module Operators

Content

  • Higher-order functions
    • First-class functions
    • Higher-order functions
    • Functions as parameters and callbacks
    • Nested functions and scope
    • Functions as return values and closures
    • Currying
    • The functools module and Partial function application
    • The operator Module

Bibliography

  • David Mertz, Functional Programming in Python, O'Reilly Media, 2015 HTML
  • Composing Programs, a free online introduction to programming and computer science (Section 1.6) HTML

Materials

Summary

  • First-class functions. Higher-order functions. Functions as parameters and callbacks. Nested functions. Functions as return values and closures. Currying. Partial function application.

FPRO, 2020/21

« Previous | Index | Next »

teach/fpro/lectures/17.txt · Last modified: 03/01/2021 17:43 by Correia Lopes