Equations
- replicateM n m = sequence (List.replicate n m)
Instances For
Equations
- replicateM' n m = sequence' (List.replicate n m)
Instances For
theorem
MonadCnd.sequence
{α : Type}
{M : Type → Type}
[hM : Monad M]
[hM₂ : LawfulMonad M]
{p : {α : Type} → M α → Prop}
[H : MonadCnd p]
{ms : List (M α)}
(h₁ : ∀ m ∈ ms, p m)
:
p (_root_.sequence ms)
theorem
MonadCnd.sequence'
{α : Type}
{M : Type → Type}
[hM : Monad M]
[hM₂ : LawfulMonad M]
{p : {α : Type} → M α → Prop}
[H : MonadCnd p]
{ms : List (M α)}
(h₁ : ∀ m ∈ ms, p m)
:
p (_root_.sequence' ms)
theorem
MonadCnd.replicateM
{α : Type}
{M : Type → Type}
[hM : Monad M]
[hM₂ : LawfulMonad M]
{p : {α : Type} → M α → Prop}
[H : MonadCnd p]
{m : M α}
{n : ℕ}
(h₁ : p m)
:
p (_root_.replicateM n m)
theorem
MonadCnd.replicateM'
{α : Type}
{M : Type → Type}
[hM : Monad M]
[hM₂ : LawfulMonad M]
{p : {α : Type} → M α → Prop}
[H : MonadCnd p]
{m : M α}
{n : ℕ}
(h₁ : p m)
:
p (_root_.replicateM' n m)