Skip to content

Instantly share code, notes, and snippets.

@vindex10
Created July 24, 2018 08:58
Show Gist options
  • Save vindex10/3f4b4b1296828b4f6e426e6dd37b9dcf to your computer and use it in GitHub Desktop.
Save vindex10/3f4b4b1296828b4f6e426e6dd37b9dcf to your computer and use it in GitHub Desktop.
# Write a function named "davasaan" (division with all vowels a) which calculates integer
# division by 10. The vowels "eiou" are disallowed as are the slash "/", asterisk "*",
# and period "." characters.
q=lambda f:lambda z:f(f(z))
davasaan=lambda n:q(q(q)(q)(lambda t:t+map(lambda x:x+t[-1]+1,t)))([0,0,0,0,0])[n>>1]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment