# All files / src Relude_Function.bs.js

54.55% Statements 42/77
100% Branches 0/0
60% Functions 12/20
54.55% Lines 42/77

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
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235

    26x
    26x
    26x
    26x
    26x

    5x

    1x

    1x

    42x

    1x

    1x

    1x

    1x

    3x

    1x

    1x

    1x

    26x

    26x

    26x

    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x
    26x

     'use strict';

    var Curry = require("bs-platform/lib/js/curry.js");
    var Relude_Extensions_Apply = require("./extensions/Relude_Extensions_Apply.bs.js");
    var Relude_Extensions_Monad = require("./extensions/Relude_Extensions_Monad.bs.js");
    var Relude_Extensions_Functor = require("./extensions/Relude_Extensions_Functor.bs.js");
    var Relude_Extensions_Applicative = require("./extensions/Relude_Extensions_Applicative.bs.js");

    function identity(a) {
      return a;
    }

    function $$const(a, param) {
      return a;
    }

    function flip(f, b, a) {
      return Curry._2(f, a, b);
    }

    function compose(f, g, a) {
      return Curry._1(f, Curry._1(g, a));
    }

    function flipCompose(f, g, a) {
      return Curry._1(g, Curry._1(f, a));
    }

    function curry2(f, a, b) {
      return Curry._1(f, /* tuple */[
                  a,
                  b
                ]);
    }

    function curry3(f, a, b, c) {
      return Curry._1(f, /* tuple */[
                  a,
                  b,
                  c
                ]);
    }

    function curry4(f, a, b, c, d) {
      return Curry._1(f, /* tuple */[
                  a,
                  b,
                  c,
                  d
                ]);
    }

    function curry5(f, a, b, c, d, e) {
      return Curry._1(f, /* tuple */[
                  a,
                  b,
                  c,
                  d,
                  e
                ]);
    }

    function uncurry2(f, param) {
      return Curry._2(f, param[0], param[1]);
    }

    function uncurry3(f, param) {
      return Curry._3(f, param[0], param[1], param[2]);
    }

    function uncurry4(f, param) {
      return Curry._4(f, param[0], param[1], param[2], param[3]);
    }

    function uncurry5(f, param) {
      return Curry._5(f, param[0], param[1], param[2], param[3], param[4]);
    }

    function map(aToB, rToA, r) {
      return Curry._1(aToB, Curry._1(rToA, r));
    }

    function apply(rToAToB, rToA, r) {
      return Curry._2(rToAToB, r, Curry._1(rToA, r));
    }

    function pure(a, param) {
      return a;
    }

    function bind(rToA, arToB, r) {
      return Curry._2(arToB, Curry._1(rToA, r), r);
    }

    function flatMap(f, fa) {
      return (function (param) {
          return Curry._2(f, Curry._1(fa, param), param);
        });
    }

    var Infix = /* module */[
      /* << */compose,
      /* >> */flipCompose
    ];

    function WithArgument(R) {
      var Functor = /* module */[/* map */map];
      var include = Relude_Extensions_Functor.FunctorExtensions(Functor);
      var Apply = /* module */[
        /* map */map,
        /* apply */apply
      ];
      var include$1 = Relude_Extensions_Apply.ApplyExtensions(Apply);
      var Applicative = /* module */[
        /* map */map,
        /* apply */apply,
        /* pure */pure
      ];
      var include$2 = Relude_Extensions_Applicative.ApplicativeExtensions(Applicative);
      var Monad = /* module */[
        /* map */map,
        /* apply */apply,
        /* pure */pure,
        /* flat_map */bind
      ];
      var include$3 = Relude_Extensions_Monad.MonadExtensions(Monad);
      var include$4 = Relude_Extensions_Functor.FunctorInfix(Functor);
      var include$5 = Relude_Extensions_Apply.ApplyInfix(Apply);
      var include$6 = Relude_Extensions_Monad.MonadInfix(Monad);
      var Infix_000 = /* FunctorExtensions */include$4[0];
      var Infix_001 = /* <$> */include$4[1];
      var Infix_002 = /* <#> */include$4[2];
      var Infix_003 = /* <$ */include$4[3];
      var Infix_004 = /* $> */include$4[4];
      var Infix_005 = /* <@> */include$4[5];
      var Infix_006 = /* ApplyExtensions */include$5[0];
      var Infix_007 = /* <*> */include$5[1];
      var Infix_008 = /* <* */include$5[2];
      var Infix_009 = /* *> */include$5[3];
      var Infix_010 = /* MonadExtensions */include$6[0];
      var Infix_011 = /* >>= */include$6[1];
      var Infix_012 = /* =<< */include$6[2];
      var Infix_013 = /* >=> */include$6[3];
      var Infix_014 = /* <=< */include$6[4];
      var Infix = /* module */[
        Infix_000,
        Infix_001,
        Infix_002,
        Infix_003,
        Infix_004,
        Infix_005,
        Infix_006,
        Infix_007,
        Infix_008,
        Infix_009,
        Infix_010,
        Infix_011,
        Infix_012,
        Infix_013,
        Infix_014,
        /* << */compose,
        /* >> */flipCompose
      ];
      return /* module */[
              /* Functor */Functor,
              /* map */map,
              /* BsFunctorExtensions */include[0],
              /* flipMap */include[1],
              /* void */include[2],
              /* voidRight */include[3],
              /* voidLeft */include[4],
              /* flap */include[5],
              /* Apply */Apply,
              /* apply */apply,
              /* BsApplyExtensions */include$1[0],
              /* applyFirst */include$1[1],
              /* applySecond */include$1[2],
              /* map2 */include$1[3],
              /* map3 */include$1[4],
              /* map4 */include$1[5],
              /* map5 */include$1[6],
              /* tuple2 */include$1[7],
              /* tuple3 */include$1[8],
              /* tuple4 */include$1[9],
              /* tuple5 */include$1[10],
              /* mapTuple2 */include$1[11],
              /* mapTuple3 */include$1[12],
              /* mapTuple4 */include$1[13],
              /* mapTuple5 */include$1[14],
              /* Applicative */Applicative,
              /* pure */pure,
              /* BsApplicativeExtensions */include$2[0],
              /* liftA1 */include$2[1],
              /* Monad */Monad,
              /* bind */bind,
              /* BsMonadExtensions */include$3[0],
              /* flatMap */include$3[1],
              /* flatten */include$3[2],
              /* composeKleisli */include$3[3],
              /* flipComposeKleisli */include$3[4],
              /* liftM1 */include$3[5],
              /* when_ */include$3[6],
              /* unless */include$3[7],
              /* Infix */Infix
            ];
    }

    var id = identity;

    var andThen = flipCompose;

    exports.identity = identity;
    exports.id = id;
    exports.$$const = $$const;
    exports.flip = flip;
    exports.compose = compose;
    exports.flipCompose = flipCompose;
    exports.andThen = andThen;
    exports.curry2 = curry2;
    exports.curry3 = curry3;
    exports.curry4 = curry4;
    exports.curry5 = curry5;
    exports.uncurry2 = uncurry2;
    exports.uncurry3 = uncurry3;
    exports.uncurry4 = uncurry4;
    exports.uncurry5 = uncurry5;
    exports.map = map;
    exports.apply = apply;
    exports.pure = pure;
    exports.bind = bind;
    exports.flatMap = flatMap;
    exports.Infix = Infix;
    exports.WithArgument = WithArgument;
    /* Relude_Extensions_Apply Not a pure module */