Class IsLeft


public class IsLeft extends PrimitiveFunction
Check if an Either value is a Left.
  • Field Details

    • NAME

      public static final Name NAME
  • Constructor Details

    • IsLeft

      public IsLeft()
  • Method Details

    • name

      public Name name()
      Description copied from class: PrimitiveFunction
      The unique name of the primitive function.
      Specified by:
      name in class PrimitiveFunction
      Returns:
      the name of this primitive function
    • type

      public TypeScheme type()
      Description copied from class: PrimitiveFunction
      The datatype of the primitive function.
      Specified by:
      type in class PrimitiveFunction
      Returns:
      the type scheme of this primitive function
    • implementation

      protected Function<List<Term>,Flow<Graph,Term>> implementation()
      Description copied from class: PrimitiveFunction
      A dynamic/interpreted implementation of the function.
      Specified by:
      implementation in class PrimitiveFunction
      Returns:
      the function implementation
    • apply

      public static <A, B> Boolean apply(Either<A,B> either)
      Check if an Either value is a Left.
      Type Parameters:
      A - the left type
      B - the right type
      Parameters:
      either - the Either value to check
      Returns:
      true if the Either is a Left, false otherwise