Python compose function - performs right-to-left function composition
Thu Jan 09 2020 19:00:00 GMT+0000 (Coordinated Universal Time)
Saved by @peterents #python #function
Use functools.reduce() to perform right-to-left function composition. The last (rightmost) function can accept one or more arguments; the remaining functions must be unary.
https://www.30secondsofcode.org/python/s/compose/
Comments