import * as A from "../Array";
import type { Tree } from "./model";
export const map_ = (fa: Tree, f: (a: A) => B): Tree => ({
value: f(fa.value),
forest: A.map_(fa.forest, (a) => map_(a, f))
});
export const map = (f: (a: A) => B) => (fa: Tree): Tree => map_(fa, f);