Apply Predicate-Based Function

# Introduction In Python, functions are first-class objects, which means that they can be passed around like any other value. One useful application of this is to conditionally apply a function to a value based on some predicate. In this challenge, you will be asked to write a function that takes a predicate function and a function to apply when the predicate is true, and returns a new function that applies the function when the predicate is true.

|
60 : 00

Click the virtual machine below to start practicing