com.github.mperry.fg.ListMonadStaticExtension.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of functionalgroovy-main Show documentation
Show all versions of functionalgroovy-main Show documentation
FunctionalGroovy enhances FunctionalJava for Groovy
package com.github.mperry.fg
import com.github.mperry.fg.typeclass.concrete.ListMonad
import fj.F
import fj.F2
import fj.Unit
import fj.data.Stream
import groovy.transform.TypeChecked
//import groovy.transform.TypeChecked
//import groovy.transform.TypeCheckingMode
/**
* Created by MarkPerry on 16/01/14.
*/
@TypeChecked
class ListMonadStaticExtension {
static ListMonad monad() {
new ListMonad()
}
static List join(List list, List> list2) {
monad().join(list2)
}
static List> filterM(List z, List list, F> f) {
monad().filterM(list, f)
}
static List foldM(List l, Stream s, B b, F2> f) {
monad().foldM(s, b, f)
}
static List foldM_(List l, Stream s, B b, F2> f) {
monad().foldM_(s, b, f)
}
static List foldM(List z, List s, B b, F2> f) {
monad().foldM(s, b, f)
}
static List foldM_(List l, List s, B b, F2> f) {
monad().foldM_(s, b, f)
}
static List> sequence(List l, List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy