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

main.net.jqwik.kotlin.api.BuildersExtensions.kt Maven / Gradle / Ivy

There is a newer version: 1.9.1
Show newest version
package net.jqwik.kotlin.api

import net.jqwik.api.Arbitrary
import net.jqwik.api.Builders.BuilderCombinator
import org.apiguardian.api.API
import java.util.function.BiFunction

/**
 * Convenience function for Kotlin to not use backticked `in` function.
 */
@API(status = API.Status.EXPERIMENTAL, since = "1.6.0")
fun  BuilderCombinator.use(arbitrary: Arbitrary, combinator: (B, T) -> B): BuilderCombinator
    where B : Any {
    return this.use(arbitrary).`in`(combinator)
}