// Path: src/main/java/streams/algebras/StreamAlg.java
// public interface StreamAlg<C> {
//     <T> App<C, T> source(T[] array);
// 
//     <T, R> App<C, R> map(Function<T, R> f, App<C, T> app);
// 
//     <T, R> App<C, R> flatMap(Function<T, App<C, R>> f, App<C, T> app);
// 
//     <T> App<C, T> filter(Predicate<T> f, App<C, T> app);
// }
// 
// Path: src/main/java/streams/higher/App.java
// public interface App<C, T> {
// }


import streams.algebras.StreamAlg;
import streams.higher.App;
import java.util.function.Predicate;
package streams.fold;



/**
 * Authors:
 * Aggelos Biboudis (@biboudis)
 * Nick Palladinos (@NickPalladinos)
 */
public class Filter<T> extends Stream<T> {

    final Predicate<T> predicate;
    final Stream<T> stream;

    public Filter(Predicate<T> predicate, Stream<T> stream) {
// Path: src/main/java/streams/algebras/StreamAlg.java
// public interface StreamAlg<C> {
//     <T> App<C, T> source(T[] array);
// 
//     <T, R> App<C, R> map(Function<T, R> f, App<C, T> app);
// 
//     <T, R> App<C, R> flatMap(Function<T, App<C, R>> f, App<C, T> app);
// 
//     <T> App<C, T> filter(Predicate<T> f, App<C, T> app);
// }
// 
// Path: src/main/java/streams/higher/App.java
// public interface App<C, T> {
// }


// Path: src/main/java/streams/fold/Filter.java
import streams.algebras.StreamAlg;
import streams.higher.App;
import java.util.function.Predicate;

package streams.fold;



/**
 * Authors:
 * Aggelos Biboudis (@biboudis)
 * Nick Palladinos (@NickPalladinos)
 */
public class Filter<T> extends Stream<T> {

    final Predicate<T> predicate;
    final Stream<T> stream;

    public Filter(Predicate<T> predicate, Stream<T> stream) {
        this.predicate = predicate;