Package fj.data

Class $<A,​B>

  • All Implemented Interfaces:
    F0<B>, java.util.function.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 Detail

      • b

        private final B b
    • Constructor Detail

      • $

        private $​(B b)
    • Method Detail

      • __

        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.