An open API service indexing awesome lists of open source software.

https://github.com/johnsonlee/once

A library to make sure code blocks are executed only once
https://github.com/johnsonlee/once

Last synced: about 1 year ago
JSON representation

A library to make sure code blocks are executed only once

Awesome Lists containing this project

README

          

# Once

A library to make sure code blocks are executed only once

## Getting Started

Configuring the dependencies:

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

Then, you can use it in your code:

```kotlin
class Gretting {

val once = Once()

fun hello(name: String): Unit = once {
println("Hello, ${name}")
}

}
```