This came from a real-world use case: a user wants to define a validation function for something that is either an int or a list of ints.
from mini_lambda import Isinstance
my_expr = Isinstance(int) | (Isinstance(list) & ...)
is_valid = my_expr.as_function()
assert is_valid(5)
assert not is_valid('f')
assert is_valid([1, 2])
assert not is_valid([1, 'f'])
What should we suggest instead of ... above ?