feat: add lab7

This commit is contained in:
Yadunand Prem
2022-10-20 13:51:59 +08:00
parent 4ee04937da
commit 86e5d543b2
29 changed files with 1223 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package cs2030s.fp;
/**
* Represent a function that combines two values into one. The two inputs
* and the result can be of different types.
* CS2030S Lab 5
* AY20/21 Semester 2
*
* @param <R> The type of the return value
* @param <S> The type of the first input value
* @param <T> The type of the second input value
*/
@FunctionalInterface
public interface Combiner<R, S, T> {
/**
* The functional method to combines two values into one.
*
* @param s The first input value
* @param t The second input value
* @return The value after combining s and t.
*/
R combine(S s, T t);
}