init component
This commit is contained in:
21
node_modules/fp-ts/es6/Compactable.js
generated
vendored
Normal file
21
node_modules/fp-ts/es6/Compactable.js
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
import { pipe } from './function';
|
||||
import { getFunctorComposition, map } from './Functor';
|
||||
import { getLeft, getRight } from './Option';
|
||||
import * as S from './Separated';
|
||||
export function compact(F, G) {
|
||||
return function (fga) { return F.map(fga, G.compact); };
|
||||
}
|
||||
export function separate(F, C, G) {
|
||||
var _compact = compact(F, C);
|
||||
var _map = map(F, G);
|
||||
return function (fge) { return S.separated(_compact(pipe(fge, _map(getLeft))), _compact(pipe(fge, _map(getRight)))); };
|
||||
}
|
||||
/** @deprecated */
|
||||
export function getCompactableComposition(F, G) {
|
||||
var map = getFunctorComposition(F, G).map;
|
||||
return {
|
||||
map: map,
|
||||
compact: compact(F, G),
|
||||
separate: separate(F, G, G)
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user