chore: move Stack and Queue to Std
This commit is contained in:
parent
18431d7b52
commit
59c082ef1a
6 changed files with 7 additions and 22 deletions
|
|
@ -22,5 +22,3 @@ import Init.Data.RBMap
|
|||
import Init.Data.Option
|
||||
import Init.Data.HashMap
|
||||
import Init.Data.Random
|
||||
import Init.Data.Queue
|
||||
import Init.Data.Stack
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
/-
|
||||
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Daniel Selsam
|
||||
-/
|
||||
prelude
|
||||
import Init.Data.Queue.Basic
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
/-
|
||||
Copyright (c) 2019 Microsoft Corporation. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Daniel Selsam
|
||||
-/
|
||||
prelude
|
||||
import Init.Data.Stack.Basic
|
||||
|
|
@ -4,3 +4,6 @@ Released under Apache 2.0 license as described in the file LICENSE.
|
|||
Authors: Leonardo de Moura
|
||||
-/
|
||||
import Std.Data.BinomialHeap
|
||||
import Std.Data.DList
|
||||
import Std.Data.Stack
|
||||
import Std.Data.Queue
|
||||
|
|
|
|||
|
|
@ -6,9 +6,7 @@ Authors: Daniel Selsam
|
|||
Simple queue implemented using two lists.
|
||||
Note: this is only a temporary placeholder.
|
||||
-/
|
||||
prelude
|
||||
import Init.Data.Array
|
||||
import Init.Data.Int
|
||||
namespace Std
|
||||
universes u v w
|
||||
|
||||
structure Queue (α : Type u) :=
|
||||
|
|
@ -39,3 +37,4 @@ match q.dList with
|
|||
| d::ds => some (d, { eList := [], dList := ds })
|
||||
|
||||
end Queue
|
||||
end Std
|
||||
|
|
@ -5,9 +5,7 @@ Authors: Daniel Selsam
|
|||
|
||||
Simple stack API implemented using an array.
|
||||
-/
|
||||
prelude
|
||||
import Init.Data.Array
|
||||
import Init.Data.Int
|
||||
namespace Std
|
||||
universes u v w
|
||||
|
||||
structure Stack (α : Type u) :=
|
||||
|
|
@ -39,3 +37,4 @@ def modify [Inhabited α] (s : Stack α) (f : α → α) : Stack α :=
|
|||
{ s with vals := s.vals.modify (s.vals.size-1) f }
|
||||
|
||||
end Stack
|
||||
end Std
|
||||
Loading…
Add table
Reference in a new issue