All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.tonivade.purefun.Higher3 Maven / Gradle / Ivy

/*
 * Copyright (c) 2018-2020, Antonio Gabriel Muñoz Conejo 
 * Distributed under the terms of the MIT License
 */
package com.github.tonivade.purefun;

import java.util.function.Function;

public interface Higher3 extends Higher2, B, C>, Higher1, B>, C> {

  @Override
  default  R fix1(Function, B>, C>, ? extends R> function) {
    return Higher2.super.fix1(function);
  }

  @Override
  default  R fix2(Function, B, C>, ? extends R> function) {
    return Higher2.super.fix2(function);
  }

  default  R fix3(Function, ? extends R> function) {
    return function.apply(this);
  }

  default Higher3 kind3() {
    return this;
  }

  @SuppressWarnings("unchecked")
  static  Higher3 narrowK(Higher1, B>, C> value) {
    return (Higher3) value;
  }

  @SuppressWarnings("unchecked")
  static  Higher3 narrowK(Higher2, B, C> value) {
    return (Higher3) value;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy