0.0.1 • Published 6 years ago
ts-list-zipper v0.0.1
ts-list-zipper
A zipper for use with arrays in TS.
import { Zipper } from "Zipper"
let zipper = Zipper.fromCons(1, [2, 3]);
console.log(zipper.current()); // 1
zipper.next();
console.log(zipper.current()); // 2
zipper.next();
console.log(zipper.current()); // 3
zipper.next();
console.log(zipper.current()); // 3
zipper.first();
console.log(zipper.current()); // 1
0.0.1
6 years ago