Skip to content

micheleAlberto/MUOio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MUO.io

just some fun with python syntax

this is fizzbuzz (checking input type):

from muoio import Piper
pipe = (Piper()
    [lambda x:isinstance(x,int) : (lambda x:(x,""))]
    [lambda x:x[0]%3!=0 :: lambda x:(x[0],x[1]+"fizz")]
    [lambda x:x[0]%5!=0 :: lambda x:(x[0],x[1]+"buzz")]
)
print list(pipe.run.run([
    1,None, None
    2,3,4,
    None,5,6,
    None, None, 7,
    8,9,10
]))

Piper()[condition:branch_if_true:branch_if_false]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages