definition: |
replicateM :: (Applicative m) => Int -> m a -> m [a] replicateM cnt0 f = loop cnt0 where loop cnt | cnt <= 0 = pure [] | otherwise = liftA2 (:) f (loop (cnt - 1)) |
demand: |
arguments 1 2 3 |
deterministic: |
deterministic operation |
documentation: |
@'replicateM' n act@ performs the action @n@ times, gathering the results. |
failfree: |
(_, _, _) |
indeterministic: |
referentially transparent operation |
infix: |
no fixity defined |
iotype: |
{(_,_,_) |-> _} |
name: |
replicateM |
precedence: |
no precedence defined |
result-values: |
_ |
signature: |
Prelude.Applicative a => Prelude.Int -> a b -> a [b] |
solution-complete: |
operation might suspend on free variables |
terminating: |
possibly non-terminating |
totally-defined: |
possibly non-reducible on same data term |