code: function _takeDrop(arrayCase, generalCase) {
      return function(n) {
        return function(xs) {
          if (n < 0) return Nothing;
  
          //  Fast path for arrays.
          if (Array.isArray (xs)) {
            return n <= xs.length ? Just (arrayCase (n, xs)) : Nothing;
          }
  
          //  m :: Maybe (Pair Integer (f a))
          var m = Z.reduce (function(m, x) {
            return Z.map (function(pair) {
              var n = pair.fst;
              var xs = pair.snd;
              return Pair (n - 1) (generalCase (n, xs, x));
            }, m);
          }, Just (Pair (n) (Z.empty (xs.constructor))), xs);
  
          return Z.map (Pair.snd, Z.reject (B (gt (0)) (Pair.fst), m));
        };
      };
    }
docs: # take :: (Applicative f, Foldable f, Monoid (f a)) => Integer -> f a -> Maybe (f a) . . Returns Just the first N elements of the given structure if N is . non-negative and less than or equal to the size of the structure; . Nothing otherwise. . . ```javascript . > S.take (0) (['foo', 'bar']) . Just ([]) . . > S.take (1) (['foo', 'bar']) . Just (['foo']) . . > S.take (2) (['foo', 'bar']) . Just (['foo', 'bar']) . . > S.take (3) (['foo', 'bar']) . Nothing . . > S.take (3) (Cons (1) (Cons (2) (Cons (3) (Cons (4) (Cons (5) (Nil)))))) . Just (Cons (1) (Cons (2) (Cons (3) (Nil)))) . ```