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

95.45% Statements 21/22
100% Branches 0/0
75% Functions 3/4
95.45% Lines 21/22

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
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56

    31x
    31x

    160x
    160x

    160x
    160x
    160x
    160x
    160x

    80x
    80x
    19x

    80x
    80x
    80x
    80x
    80x

    80x
    80x

    31x
    31x

     'use strict';

    var Curry = require("bs-platform/lib/js/curry.js");
    var Functions$BsAbstract = require("bs-abstract/lib/js/src/functions/Functions.bs.js");

    function FunctorExtensions(F) {
      var BsFunctorExtensions = Functions$BsAbstract.Functor(F);
      var flipMap = function (fa, f) {
        return Curry._2(F.map, f, fa);
      };
      var $$void = BsFunctorExtensions.$$void;
      var voidRight = BsFunctorExtensions.void_right;
      var voidLeft = BsFunctorExtensions.void_left;
      var flap = BsFunctorExtensions.flap;
      return {
              BsFunctorExtensions: BsFunctorExtensions,
              flipMap: flipMap,
              $$void: $$void,
              voidRight: voidRight,
              voidLeft: voidLeft,
              flap: flap
            };
    }

    function FunctorInfix(F) {
      var BsFunctorExtensions = Functions$BsAbstract.Functor(F);
      var flipMap = function (fa, f) {
        return Curry._2(F.map, f, fa);
      };
      var $$void = BsFunctorExtensions.$$void;
      var voidRight = BsFunctorExtensions.void_right;
      var voidLeft = BsFunctorExtensions.void_left;
      var flap = BsFunctorExtensions.flap;
      var FunctorExtensions = {
        BsFunctorExtensions: BsFunctorExtensions,
        flipMap: flipMap,
        $$void: $$void,
        voidRight: voidRight,
        voidLeft: voidLeft,
        flap: flap
      };
      var $less$$great = F.map;
      return {
              FunctorExtensions: FunctorExtensions,
              $less$$great: $less$$great,
              $less$hash$great: flipMap,
              $less$: voidRight,
              $$great: voidLeft,
              $less$at$great: flap
            };
    }

    exports.FunctorExtensions = FunctorExtensions;
    exports.FunctorInfix = FunctorInfix;
    /* Functions-BsAbstract Not a pure module */