MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / use

Function use

src/main/java/field/utility/KotlinExtensions.kt:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40
41inline fun <R, T : Bracketable> T.use(b: (T) -> R): R {
42 this.open()
43 var r: R
44 try {
45 r = b(this)
46 } finally {
47 this.close()
48 }
49 return r
50}
51
52val Number.d: Double
53 get() = this.toDouble()

Callers

nothing calls this directly

Calls 3

openMethod · 0.65
closeMethod · 0.65
bFunction · 0.50

Tested by

no test coverage detected