Double then increment numbers
Input
compose_map([lambda x: x * 2, lambda x: x + 1], [1, 2, 3])
Output
[3, 5, 7]
Each number is doubled then incremented: 1->2->3, 2->4->5, 3->6->7.
Full lesson preview
Create a reusable map pipeline that applies a sequence of functions to each item in an iterable.
Problem statement
Task
Examples
Input
compose_map([lambda x: x * 2, lambda x: x + 1], [1, 2, 3])
Output
[3, 5, 7]
Each number is doubled then incremented: 1->2->3, 2->4->5, 3->6->7.
Input format
Output format
Constraints
Samples
Input
compose_map([str, lambda s: s + '!'], [1, 2])
Output
['1!', '2!']
Convert numbers to strings then append '!'.