Interface Semigroup<A>

    • Method Detail

      • foldLeft

        default A foldLeft​(A a,
                           java.lang.Iterable<A> as)
        Catamorphism under this semigroup using FoldLeft, where the binary operator is this semigroup, and the starting accumulator is provided.
        Parameters:
        a - the starting accumulator
        as - the elements to fold over
        Returns:
        the folded result
        See Also:
        FoldLeft
      • foldRight

        default Lazy<A> foldRight​(A a,
                                  java.lang.Iterable<A> as)
        Catamorphism under this semigroup using FoldRight, where the binary operator is this semigroup, and the starting accumulator is provided.
        Parameters:
        a - the starting accumulator
        as - the elements to fold over
        Returns:
        the folded result
        See Also:
        FoldRight
      • flip

        default Semigroup<A> flip()
        Flip the order of the arguments.
        Specified by:
        flip in interface Fn2<A,​A,​A>
        Returns:
        an Fn2<B, A, C>