diff --git a/Prelude/Curry.swift b/Prelude/Curry.swift index 78ffde0..6add54e 100644 --- a/Prelude/Curry.swift +++ b/Prelude/Curry.swift @@ -29,3 +29,8 @@ public func uncurry(f: T -> U -> V) -> (T, U) -> V { public func uncurry(f: T -> U -> V -> W) -> (T, U, V) -> W { return { f($0)($1)($2) } } + +/// Uncurries a curried quaternary function `f`, producing a function which can be applied to a tuple. +public func uncurry(f: T -> U -> V -> W -> X) -> (T, U, V, W) -> X { + return { f($0)($1)($2)($3) } +}