Package fj.data

Class $<A,B>

java.lang.Object
fj.P1<B>
fj.data.$<A,B>
All Implemented Interfaces:
F0<B>, Supplier<B>

public final class $<A,B> extends P1<B>
The constant arrow, for attaching a new name to an existing type. For every pair of types A and B, this type is the identity morphism from B to B.
  • Field Details

    • b

      private final B b
  • Constructor Details

    • $

      private $(B b)
  • Method Details

    • __

      public static <A, B> $<A,B> __(B b)
      Returns a function that given an argument, returns a function that ignores its argument.
      Returns:
      A function that given an argument, returns a function that ignores its argument.
    • constant

      public static <A, B> $<A,B> constant(B b)
    • _1

      public B _1()
      Description copied from class: P1
      Access the first element of the product.
      Specified by:
      _1 in class P1<B>
      Returns:
      The first element of the product.