Higher-order functions are the ultimate solution to DRY. In this lecture we introduce a number of standard higher-order functions over lists, functions for creating and manipulating other functions.
The correct steps of the derivation presented in the slides are the following:
mul x y = \s z -> x (y s) z
= \s z -> (x . y) s z
= x . y
Introduction to Functional Programming by TU Delft OpenCourseWare is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Based on a work at https://ocw.tudelft.nl/courses/introduction-to-functional-programming/.