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

org.aya.guest0x0.cubical.Formula Maven / Gradle / Ivy

package org.aya.guest0x0.cubical;

import org.jetbrains.annotations.NotNull;

import java.util.function.Function;

public sealed interface Formula {
   @NotNull Formula fmap(@NotNull Function f);
  /** @param isAnd it's or if false */
  record Conn(boolean isAnd, @NotNull E l, @NotNull E r) implements Formula {
    public  @NotNull Conn fmap(@NotNull Function f) {return new Conn<>(isAnd, f.apply(l), f.apply(r));}
  }
  record Inv(@NotNull E i) implements Formula {
    public  @NotNull Inv fmap(@NotNull Function f) {return new Inv<>(f.apply(i));}
  }
  record Lit(boolean isLeft) implements Formula {
    public  @NotNull Lit fmap(@NotNull Function f) {return new Lit<>(isLeft);}
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy