lean4-htt/src/Std/Data.lean
Paul Reichert f4ee72b18c
feat: minimal iterator library (#8358)
This PR introduces a very minimal version of the new iterator library.
It comes with list iterators and various consumers, namely `toArray`,
`toList`, `toListRev`, `ForIn`, `fold`, `foldM` and `drain`. All
consumers also come in a partial variant that can be used without any
proofs. This limited version of the iterator library generates decent
code, even with the old code generator.
2025-05-20 14:53:57 +00:00

27 lines
813 B
Text

/-
Copyright (c) 2024 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Markus Himmel
-/
prelude
import Std.Data.DHashMap
import Std.Data.HashMap
import Std.Data.HashSet
import Std.Data.DTreeMap
import Std.Data.TreeMap
import Std.Data.TreeSet
import Std.Data.ExtDHashMap
import Std.Data.ExtHashMap
import Std.Data.ExtHashSet
-- The imports above only import the modules needed to work with the version which bundles
-- the well-formedness invariant, so we need to additionally import the files that deal with the
-- unbundled version
import Std.Data.DHashMap.RawLemmas
import Std.Data.HashMap.RawLemmas
import Std.Data.HashSet.RawLemmas
import Std.Data.DTreeMap.Raw
import Std.Data.TreeMap.Raw
import Std.Data.TreeSet.Raw
import Std.Data.Iterators