def int_int_doSomething(a, b):
    return a + b * 2 > 5

def int_int_doSomethingElse(a, b):
    return a - b * 4
Example = {}
Example[int, int] = int_int_doSomething, int_int_doSomethingElse

def doSomething(a, b):
    types = type(a), type(b)
return Example[types][0](a, b)

def doSomethingElse(a, b):
    types = type(a), type(b)
return Example[types][1](a, b)
От Haskell к функциональному Python