try using pipe

This commit is contained in:
Michael Arnaldi
2020-08-21 21:16:18 +01:00
parent 94d831ff40
commit cc1e85ba56
@@ -1,3 +1,4 @@
import { pipe } from "../../Function"
import type { IdentityBoth } from "../Combined"
import type { Covariant, CovariantComposition } from "../Covariant"
import { getCovariantComposition } from "../Covariant"
@@ -172,7 +173,7 @@ export function getTraversableComposition(
foreachF: (H) => {
const foreachF = F.foreachF(H)
const foreachG = G.foreachF(H)
return (f) => foreachF(foreachG(f))
return (f) => pipe(f, foreachG, foreachF)
}
}
}