Last active
February 18, 2019 07:59
-
-
Save dsebban/ff9e7374c86b00f712c6f63a31b3115d to your computer and use it in GitHub Desktop.
haskell flip in Scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flip[A,B,C]: (A => B => C) => (B => A => C) = f => x => y => f(y)(x) | |
def f: Int => String => Int= a => b => a + b.toInt | |
flip(f)("1")(2) | |
def ++ : String => String => String = a => b => a + b | |
flip(++)("Hello")("World") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment