Skip to content

Repository files navigation

Once

A library to make sure code blocks are executed only once

Getting Started

Configuring the dependencies:

dependencies {
implementation("io.johnsonlee:once:1.1.0")
}

Then, you can use it in your code:

classGretting {
val once =Once<Unit>()
funhello(name:String): Unit= once {
println("Hello, ${name}")
}
}

About

A library to make sure code blocks are executed only once

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages