4 ms·
Except in Python where indentation changes are meaningful. def coalesce(*args): while args: next = args.pop() if next is not None:
by shaftway 10y ago
Except in Python where indentation changes are meaningful.
def coalesce(*args):
while args:
next = args.pop()
if next is not None:
return next
return None
def coalesce(*args):
while args:
next = args.pop()
if next is not None:
return next
return None