function5
  :: (a -> Gen r -> Gen r)
  -> (b -> Gen r -> Gen r)
  -> (c -> Gen r -> Gen r)
  -> (d -> Gen r -> Gen r)
  -> (e -> Gen r -> Gen r)
  -> Gen r
  -> Gen (a -> b -> c -> d -> e -> r)
function5 p1 p2 p3 p4 p5 = fmap f . function1 p'
  where
    p' (a, b, c, d, e) = p1 a . p2 b . p3 c . p4 d . p5 e
    f g = \a b c d e -> g (a, b, c, d, e)
function5
  :: (a -> Gen r -> Gen r)
  -> (b -> Gen r -> Gen r)
  -> (c -> Gen r -> Gen r)
  -> (d -> Gen r -> Gen r)
  -> (e -> Gen r -> Gen r)
  -> Gen r
  -> Gen (a -> b -> c -> d -> e -> r)
function5 p1 p2 p3 p4 p5 = fmap f . function1 p'
  where
    p' (a, b, c, d, e) = p1 a . p2 b . p3 c . p4 d . p5 e
    f g = \a b c d e -> g (a, b, c, d, e)
function5 p1 p2 p3 p4 p5 = fmap f . function1 p'
  where
    p' (a, b, c, d, e) = p1 a . p2 b . p3 c . p4 d . p5 e
    f g = \a b c d e -> g (a, b, c, d, e)