mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-06-08 17:29:36 +00:00
11 lines
235 B
Scala
11 lines
235 B
Scala
package com.htmlism.firepower.core
|
|
|
|
trait GrantsWriteLeases[A]:
|
|
def withWriteLease[B](f: WriteLease[A] => B)(using A: Companion[A]): B =
|
|
val lease =
|
|
new WriteLease[A]:
|
|
def canon: A =
|
|
A.canon
|
|
|
|
f(lease)
|