Skip to content

Commit

Permalink
fix: use lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
fgdorais committed Nov 25, 2024
1 parent 8db191b commit 6052abd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Batteries/Data/Array/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def eraseIdx! (a : Array α) (i : Nat) : Array α :=
panic! s!"index {i} out of bounds"

/-- `finRange n` is the array of all elements of `Fin n` in order. -/
protected def finRange (n : Nat) : Array (Fin n) := ofFn id
protected def finRange (n : Nat) : Array (Fin n) := ofFn fun i => i

end Array

Expand Down
2 changes: 1 addition & 1 deletion Batteries/Data/List/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1066,4 +1066,4 @@ where
| b :: l, r => bif p b then reverseAux (a :: r) (b :: l) else loop l (b :: r)

/-- `finRange n` lists all elements of `Fin n` in order -/
def finRange (n : Nat) : List (Fin n) := ofFn id
def finRange (n : Nat) : List (Fin n) := ofFn fun i => i

0 comments on commit 6052abd

Please sign in to comment.