Skip to content

Instantly share code, notes, and snippets.

View SuleymanEngin's full-sized avatar
🏠
Working from home

SuleymanEngin

🏠
Working from home
View GitHub Profile
@Willmo36
Willmo36 / traversal.ts
Created October 15, 2020 16:02
monocle-ts traversal example
import * as T from "monocle-ts/lib/Traversal";
import * as R from "fp-ts/lib/Record";
import { pipe } from "fp-ts/lib/function";
import { Lens } from "monocle-ts";
type Person = {
age: number;
hairColor: string;
};