Int
Equations
- Function.iterate f 0 = id
- Function.iterate f n.succ = Function.iterate f n ∘ f
Instances For
Array
List
Equations
- L.distinct = List.foldl (fun (x1 : List α) (x2 : α) => List.insert x2 x1) [] L
Instances For
Equations
- [].isDistinct = true
- (x_1 :: xs).isDistinct = (!xs.contains x_1 && xs.isDistinct)
Instances For
Equations
- List.fins.finsAux n 0 x_3 x = x
- List.fins.finsAux n i.succ h x = List.fins.finsAux n i ⋯ (⟨i, h⟩ :: x)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- TaskIO.instMonadLiftIO = { monadLift := fun {α : Type} (io : IO α) => EStateM.map (fun (a : α) => { get := Except.ok a }) io }
Equations
- One or more equations did not get rendered due to their size.
def
TaskIO.parTasks
{σ : Type u_1}
{α : Type u_2}
{β : Type}
[ForIn IO σ α]
(xs : σ)
(f : α → IO β)
:
Equations
- TaskIO.parTasks xs f = TaskIO.par xs fun (a : α) => liftM (f a).asTask
Instances For
Equations
- TaskIO.parTasksUnit xs f = TaskIO.parUnit xs fun (a : α) => liftM (f a).asTask
Instances For
Equations
- instForInOption_trestle = { forIn := fun {β : Type ?u.15} [Monad m] => Option.forIn }
Equations
- IO.randPerm L = IO.randPerm.randPermTR L [] 0
Instances For
Equations
- IO.randPerm.randPermTR [] acc n = pure acc
- IO.randPerm.randPermTR (x :: xs) acc n = do let idx ← liftM (IO.rand 0 n) let acc' : List α := acc.insertIdx idx x IO.randPerm.randPermTR xs acc' (n + 1)
Instances For
@[implemented_by Array.subtypeSizeUnsafe]
Equations
Instances For
Like forDiagM, but only runs f e e' (not f e e).
Equations
- List.forPairsM f [] = pure PUnit.unit
- List.forPairsM f (x_1 :: xs) = do xs.forM (f x_1) List.forPairsM f xs
Instances For
@[inline]
Equations
- Option.expectSome err none = Except.error (err ())
- Option.expectSome err (some a) = Except.ok a
Instances For
@[inline]
def
List.expectNonempty
{ε : Type u_1}
{α : Type u_2}
(err : Unit → ε)
:
List α → Except ε (NonemptyList α)
Equations
- List.expectNonempty err [] = Except.error (err ())
- List.expectNonempty err (x_1 :: xs) = Except.ok { hd := x_1, tl := xs }