Functional
This is a collection of methods to manipulate functions. NOTE: these methods are not available in the Scala library.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Functional.type
Members list
Value members
Concrete methods
This method inverts the order of the first two parameters of a two-(or more-)parameter curried function.
This method inverts the order of the first two parameters of a two-(or more-)parameter curried function.
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a curried function that takes the second parameter first
This method inverts the order of the parameters of a two-parameter tupled function.
This method inverts the order of the parameters of a two-parameter tupled function.
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a tupled function that takes the second parameter first
This method inverts the order of the first three parameters of a three-(or more-)parameter curried function.
This method inverts the order of the first three parameters of a three-(or more-)parameter curried function.
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a curried function that takes the third parameter first, then the second, etc.
This method inverts the order of the parameters of a three-parameter tupled function.
This method inverts the order of the parameters of a three-parameter tupled function.
NOTE: for inversion of greater numbers of parameters, please use tupleN(invertN(f))
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a tupled function that takes the parameters in reverse order
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a curried function that takes the fourth parameter first, then the third, etc.
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
- T5
-
the type of the fifth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a curried function that takes the fourth parameter first, then the third, etc.
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
- T5
-
the type of the fifth parameter
- T6
-
the type of the sixth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a curried function that takes the fourth parameter first, then the third, etc.
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
This method inverts the order of the first four parameters of a four-(or more-)parameter curried function.
Type parameters
- R
-
the result type
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
- T5
-
the type of the fifth parameter
- T6
-
the type of the sixth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a curried function that takes the fourth parameter first, then the third, etc.
This method uncurries the first two parameters of a two- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first two parameters of f; whose second parameter is the third parameter, etc.
This method uncurries the first two parameters of a two- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first two parameters of f; whose second parameter is the third parameter, etc.
This method is similar to f.tupled in the Scala library but that method will tuple all parameters of a curried function. Here, we make it explicit how many parameters we wish to tuple.
Type parameters
- R
-
the result type of function f
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a (curried) function of type (T1,T2)=>T4=>R
This method uncurries the first three parameters of a three- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first three parameters of f;
This method uncurries the first three parameters of a three- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first three parameters of f;
Type parameters
- R
-
the result type of function f
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a (curried) function of type (T1,T2)=>T4=>R
This method uncurries the first four parameters of a four- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first four parameters of f;
This method uncurries the first four parameters of a four- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first four parameters of f;
Type parameters
- R
-
the result type of function f
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a (curried) function of type (T1,T2,T3,T4)=>R
This method uncurries the first five parameters of a five- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first five parameters of f;
This method uncurries the first five parameters of a five- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first five parameters of f;
Type parameters
- R
-
the result type of function f
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
- T5
-
the type of the fifth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a (curried) function of type (T1,T2,T3,T4,T5)=>R
This method uncurries the first six parameters of a six- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first six parameters of f;
This method uncurries the first six parameters of a six- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first six parameters of f;
Type parameters
- R
-
the result type of function f
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
- T5
-
the type of the fifth parameter
- T6
-
the type of the fifth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a (curried) function of type (T1,T2,T3,T4,T5,T6)=>R
This method uncurries the first seven parameters of a seven- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first seven parameters of f;
This method uncurries the first seven parameters of a seven- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first seven parameters of f;
Type parameters
- R
-
the result type of function f
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
- T5
-
the type of the fifth parameter
- T6
-
the type of the sixth parameter
- T7
-
the type of the seventh parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a (curried) function of type (T1,T2,T3,T4,T5,T6,T7,T8)=>R
This method uncurries the first eight parameters of a eight- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first eight parameters of f;
This method uncurries the first eight parameters of a eight- (or more-) parameter curried function. The result is a (curried) function whose first parameter is a tuple of the first eight parameters of f;
Type parameters
- R
-
the result type of function f
- T1
-
the type of the first parameter
- T2
-
the type of the second parameter
- T3
-
the type of the third parameter
- T4
-
the type of the fourth parameter
- T5
-
the type of the fifth parameter
- T6
-
the type of the sixth parameter
- T7
-
the type of the seventh parameter
- T8
-
the type of the eighth parameter
Value parameters
- f
-
the function
Attributes
- Returns
-
a (curried) function of type (T1,T2,T3,T4,T5,T6,T7,T8)=>R
This method (and the following similar methods) are missing from Function (or at least, the method in Function is flaky)
This method (and the following similar methods) are missing from Function (or at least, the method in Function is flaky)
Type parameters
- R
-
the result type
- T1
-
the first parameter type
- T2
-
the second parameter type
Value parameters
- f
-
the function to be untupled
Attributes
- Returns
-
a function that takes the parameters separately (as part of a parameter set)
This method (and the following similar methods) are missing from Function (or at least, the method in Function is flaky)
This method (and the following similar methods) are missing from Function (or at least, the method in Function is flaky)
Type parameters
- R
-
the result type
- T1
-
the first parameter type
- T2
-
the second parameter type
- T3
-
the third parameter type
Value parameters
- f
-
the function to be untupled
Attributes
- Returns
-
a function that takes the parameters separately (as part of a parameter set)
This method (and the following similar methods) are missing from Function (or at least, the method in Function is flaky)
This method (and the following similar methods) are missing from Function (or at least, the method in Function is flaky)
Type parameters
- R
-
the result type
- T1
-
the first parameter type
- T2
-
the second parameter type
- T3
-
the third parameter type
- T4
-
the fourth parameter type
Value parameters
- f
-
the function to be untupled
Attributes
- Returns
-
a function that takes the parameters separately (as part of a parameter set)
This method (and the following similar methods) are missing from Function.
This method (and the following similar methods) are missing from Function.
Type parameters
- R
-
the result type
- T1
-
the first parameter type
- T2
-
the second parameter type
- T3
-
the third parameter type
- T4
-
the fourth parameter type
- T5
-
the fifth parameter type
Value parameters
- f
-
the function to be untupled
Attributes
- Returns
-
a function that takes the parameters separately (as part of a parameter set)
This method (and the following similar methods) are missing from Function.
This method (and the following similar methods) are missing from Function.
Type parameters
- R
-
the result type
- T1
-
the first parameter type
- T2
-
the second parameter type
- T3
-
the third parameter type
- T4
-
the fourth parameter type
- T5
-
the fifth parameter type
- T6
-
the sixth parameter type
Value parameters
- f
-
the function to be untupled
Attributes
- Returns
-
a function that takes the parameters separately (as part of a parameter set)
This method (and the following similar methods) are missing from Function.
This method (and the following similar methods) are missing from Function.
Type parameters
- R
-
the result type
- T1
-
the first parameter type
- T2
-
the second parameter type
- T3
-
the third parameter type
- T4
-
the fourth parameter type
- T5
-
the fifth parameter type
- T6
-
the sixth parameter type
- T7
-
the seventh parameter type
Value parameters
- f
-
the function to be untupled
Attributes
- Returns
-
a function that takes the parameters separately (as part of a parameter set)