Skip to content

Instantly share code, notes, and snippets.

View peterszerzo's full-sized avatar
🥝

Peter Szerzo peterszerzo

🥝
View GitHub Profile
@peterszerzo
peterszerzo / Undoable.ts
Created March 4, 2021 13:41
Undo-redo functionality in TypeScript
import equals from "ramda/src/equals";
export interface Undoable<T> {
_current: T;
_prevs: Array<T>;
_nexts: Array<T>;
}
export const create = <T>(val: T): Undoable<T> => ({
_current: val,
I am attesting that this GitHub handle peterszerzo is linked to the Tezos account tz1Qd57kL3wjCdmhUBaHJVvDaPcBcq79nik9 for tzprofiles
sig:edsigtsnLtDTvKMcRkpMdMmw4reKBXTG72iJ7DzYKbUAyw1LAppp6majPRmUjwLQmZ3zgxHwwgAqEgRTRZFQ8qMtJhfVJMVGNZh