lean4-code-actions
Version:
Refactorings and snippets for Lean 4
12 lines (9 loc) • 334 B
text/typescript
export interface GetLens<Source, Target> {
get: (source: Source) => Target
}
interface MutLens<Source, Target> {
mut: (source: Source, target: Target) => void // mutate source by setting the target
}
export interface UnsetLens<Source, Target> {
unset: (source: Source) => void // mutate source by setting the target to zero
}