score:3

Accepted answer
def sigma(x:int, y:int, z:int, a:int)(f:(int,int,int,int) => double):double = 1.1

def bigpi(x: int, y: int, z: int, a: int)(
             f: (int,int,int,int) => ((int,int,int,int) => double) => double
         ):double = 2.2

bigpi(1,2,3,4)(sigma)

the intellij ide says there are unnecessary parentheses but the compiler says otherwise.

score:1

try this:

def bigpi(x: int, y: int, z: int, a: int)(s: (int, int, int, int) => ((int, int, int, int) => double) => double) = whatever

Related Query