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

com.github.mperry.fg.SetMonadStaticExtension.groovy Maven / Gradle / Ivy

There is a newer version: 0.8
Show newest version
package com.github.mperry.fg

import com.github.mperry.fg.typeclass.concrete.ListMonad
import com.github.mperry.fg.typeclass.concrete.SetMonad
import fj.F
import fj.F2
import fj.Unit
import fj.data.Stream
import groovy.transform.TypeChecked

/**
 * Created by MarkPerry on 13/04/2014.
 */
@TypeChecked
class SetMonadStaticExtension {

    static SetMonad monad() {
        new SetMonad()
    }

    static  Set join(Set list, Set> list2) {
        monad().join(list2)
    }

    static  Set> filterM(Set z, List list, F> f) {
        monad().filterM(list, f)
    }

    static  Set foldM(Set l, Stream s, B b, F2> f) {
        monad().foldM(s, b, f)
    }

    static  Set foldM_(Set l, Stream s, B b, F2> f) {
        monad().foldM_(s, b, f)
    }

    static  Set> sequence(Set l, List> list) {
        monad().sequence(list)
    }

    static  F> compose(Set l, F> f,  F> g) {
        monad().compose(f, g)
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy