#3 : Using tupled fun anstead of the curried one + some refactorings