// Path: func/src/main/java/com/mcxiaoke/next/func/functions/Func1.java
// public interface Func1<T, R> extends Function {
// 
//     R call(T t);
// 
// 
// }
// 
// Path: func/src/main/java/com/mcxiaoke/next/func/functions/Predicate.java
// public interface Predicate<T> {
// 
//     /**
//      * Evaluates this predicate on the given argument.
//      *
//      * @param t the input argument
//      * @return {@code true} if the input argument matches the predicate,
//      * otherwise {@code false}
//      */
//     boolean accept(T t);
// }


import com.mcxiaoke.next.func.functions.Action1;
import com.mcxiaoke.next.func.functions.Func1;
import com.mcxiaoke.next.func.functions.Func2;
import com.mcxiaoke.next.func.functions.Predicate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
        return Collections.max(collection);
    }

    public static <T extends Object & Comparable<? super T>> T min(Collection<? extends T> collection) {
        return Collections.min(collection);
    }

    public static <T> T max(Comparator<? super T> cmp, Collection<? extends T> collection) {
        return Collections.max(collection, cmp);
    }

    public static <T> T min(Comparator<? super T> cmp, Collection<? extends T> collection) {
        return Collections.min(collection, cmp);
    }

    // ==================================================================
    // ==================================================================
    // Conditional Operators
    // ==================================================================
    // ==================================================================


    public static <T> Collection<T> distinct(Collection<? extends T> collection) {
        return new HashSet<T>(collection);
    }

    public static <T> List<T> distinct(List<? extends T> list) {
        return new ArrayList<T>(new HashSet<T>(list));
    }

// Path: func/src/main/java/com/mcxiaoke/next/func/functions/Func1.java
// public interface Func1<T, R> extends Function {
// 
//     R call(T t);
// 
// 
// }
// 
// Path: func/src/main/java/com/mcxiaoke/next/func/functions/Predicate.java
// public interface Predicate<T> {
// 
//     /**
//      * Evaluates this predicate on the given argument.
//      *
//      * @param t the input argument
//      * @return {@code true} if the input argument matches the predicate,
//      * otherwise {@code false}
//      */
//     boolean accept(T t);
// }


// Path: func/src/main/java/com/mcxiaoke/next/func/Fn.java
import com.mcxiaoke.next.func.functions.Action1;
import com.mcxiaoke.next.func.functions.Func1;
import com.mcxiaoke.next.func.functions.Func2;
import com.mcxiaoke.next.func.functions.Predicate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

        return Collections.max(collection);
    }

    public static <T extends Object & Comparable<? super T>> T min(Collection<? extends T> collection) {
        return Collections.min(collection);
    }

    public static <T> T max(Comparator<? super T> cmp, Collection<? extends T> collection) {
        return Collections.max(collection, cmp);
    }

    public static <T> T min(Comparator<? super T> cmp, Collection<? extends T> collection) {
        return Collections.min(collection, cmp);
    }

    // ==================================================================
    // ==================================================================
    // Conditional Operators
    // ==================================================================
    // ==================================================================


    public static <T> Collection<T> distinct(Collection<? extends T> collection) {
        return new HashSet<T>(collection);
    }

    public static <T> List<T> distinct(List<? extends T> list) {
        return new ArrayList<T>(new HashSet<T>(list));
    }

    public static <T> Collection<T> filter(Predicate<? super T> p,