# All files / src/extensions Relude_Extensions_Bifunctor.bs.js

75% Statements 9/12
100% Branches 0/0
50% Functions 3/6
75% Lines 9/12

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33

    19x

    10x

    10x
    2x

    10x

    10x
    10x

    19x
    19x

     'use strict';

    var Curry = require("bs-platform/lib/js/curry.js");

    function BifunctorExtensions(B) {
      var mapLeft = function (aToC, fab) {
        return Curry._3(B.bimap, aToC, (function (b) {
                      return b;
                    }), fab);
      };
      var mapRight = function (bToD, fab) {
        return Curry._3(B.bimap, (function (a) {
                      return a;
                    }), bToD, fab);
      };
      return {
              mapLeft: mapLeft,
              mapRight: mapRight,
              mapError: mapRight
            };
    }

    function BifunctorInfix(B) {
      var $less$less$$great$great = B.bimap;
      return {
              $less$less$$great$great: $less$less$$great$great
            };
    }

    exports.BifunctorExtensions = BifunctorExtensions;
    exports.BifunctorInfix = BifunctorInfix;
    /* No side effect */