Hi, I am quite FP/arrow newbie, but what I can te...
# arrow
j
Hi, I am quite FP/arrow newbie, but what I can tell is that I see the amazing benefit of functional programming (and arrow in the kt realm). Recently I started to use arrow in a small project (javafx/tornadofx) project. One of the things I don’t know how to handle is: how to pass multiple values as pipe to a function with 2 param.
Copy code
fun sum(a: Int, b: Int) = a + b
        fun format(a: Int) = "Result: $a"
        fun printResult(result: String) = println(result)

        (????) pipe ::sum pipe ::format pipe ::printResult // how can I pass the value (???) to this pipe, in a FP way w/o modifying the sum signature
        
        4 pipe ::sum.partially2(3) pipe ::format pipe ::printResult //this is fine
Thank you in advance for your help/explanation