19 lines
460 B
JavaScript
19 lines
460 B
JavaScript
/**
|
|
* @since 1.6.0
|
|
*/
|
|
import { right, left, fold } from 'fp-ts/es6/Either';
|
|
import { fromEither, none, some } from 'fp-ts/es6/Option';
|
|
import { Prism } from '.';
|
|
var r = new Prism(fromEither, right);
|
|
/**
|
|
* @category constructor
|
|
* @since 1.6.0
|
|
*/
|
|
export var _right = function () { return r; };
|
|
var l = new Prism(fold(some, function () { return none; }), left);
|
|
/**
|
|
* @category constructor
|
|
* @since 1.6.0
|
|
*/
|
|
export var _left = function () { return l; };
|