ruby-like-functioal-in-python