Update when.md

This commit is contained in:
Isabelle Viktoria Maciohsek
2020-11-09 23:56:11 +02:00
committed by GitHub
parent 1ad51ba8ee
commit 51aca28237

View File

@ -3,7 +3,7 @@ title: when
tags: function,intermediate tags: function,intermediate
--- ---
Tests a value, `x`, against a `predicate` function, conditionally applying a function. Tests a value, `x`, against a testing function, conditionally applying a function.
- Check if the value of `predicate(x)` is `True` and if so return `when_true(x)`, otherwise return `x`. - Check if the value of `predicate(x)` is `True` and if so return `when_true(x)`, otherwise return `x`.