Hacker News new | ask | show | jobs
by shaftway 3397 days 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