Documentation
Lean
.
Data
.
NameTrie
Search
return to top
source
Imports
Lean.Data.PrefixTree
Init.Data.Ord.String
Imported by
Lean
.
NamePart
Lean
.
instToStringNamePart
Lean
.
NamePart
.
cmp
Lean
.
NamePart
.
lt
Lean
.
NameTrie
Lean
.
NameTrie
.
insert
Lean
.
NameTrie
.
empty
Lean
.
instInhabitedNameTrie
Lean
.
instEmptyCollectionNameTrie
Lean
.
NameTrie
.
find?
Lean
.
NameTrie
.
findLongestPrefix?
Lean
.
NameTrie
.
foldMatchingM
Lean
.
NameTrie
.
foldM
Lean
.
NameTrie
.
forMatchingM
Lean
.
NameTrie
.
forM
Lean
.
NameTrie
.
matchingToArray
Lean
.
NameTrie
.
toArray
source
inductive
Lean
.
NamePart
:
Type
str
(
s
:
String
)
:
NamePart
num
(
n
:
Nat
)
:
NamePart
Instances For
source
instance
Lean
.
instToStringNamePart
:
ToString
NamePart
Equations
source
def
Lean
.
NamePart
.
cmp
:
NamePart
→
NamePart
→
Ordering
Equations
Instances For
source
def
Lean
.
NamePart
.
lt
:
NamePart
→
NamePart
→
Bool
Equations
Instances For
source
def
Lean
.
NameTrie
(
β
:
Type
u)
:
Type
u
Equations
Instances For
source
def
Lean
.
NameTrie
.
insert
{
β
:
Type
u_1}
(
t
:
NameTrie
β
)
(
n
:
Name
)
(
b
:
β
)
:
NameTrie
β
Equations
Instances For
source
def
Lean
.
NameTrie
.
empty
{
β
:
Type
u_1}
:
NameTrie
β
Equations
Instances For
source
instance
Lean
.
instInhabitedNameTrie
{
β
:
Type
u_1}
:
Inhabited
(
NameTrie
β
)
Equations
source
instance
Lean
.
instEmptyCollectionNameTrie
{
β
:
Type
u_1}
:
EmptyCollection
(
NameTrie
β
)
Equations
source
def
Lean
.
NameTrie
.
find?
{
β
:
Type
u_1}
(
t
:
NameTrie
β
)
(
k
:
Name
)
:
Option
β
Equations
Instances For
source
@[inline]
def
Lean
.
NameTrie
.
findLongestPrefix?
{
β
:
Type
u_1}
(
t
:
NameTrie
β
)
(
k
:
Name
)
:
Option
β
Returns the value of the longest key in
t
that is a prefix of
k
, if any.
Equations
Instances For
source
@[inline]
def
Lean
.
NameTrie
.
foldMatchingM
{
m
:
Type
u_1 →
Type
u_2
}
{
β
:
Type
u_3}
{
σ
:
Type
u_1}
[
Monad
m
]
(
t
:
NameTrie
β
)
(
k
:
Name
)
(
init
:
σ
)
(
f
:
β
→
σ
→
m
σ
)
:
m
σ
Equations
Instances For
source
@[inline]
def
Lean
.
NameTrie
.
foldM
{
m
:
Type
u_1 →
Type
u_2
}
{
β
:
Type
u_3}
{
σ
:
Type
u_1}
[
Monad
m
]
(
t
:
NameTrie
β
)
(
init
:
σ
)
(
f
:
β
→
σ
→
m
σ
)
:
m
σ
Equations
Instances For
source
@[inline]
def
Lean
.
NameTrie
.
forMatchingM
{
m
:
Type
→
Type
u_1
}
{
β
:
Type
u_2}
[
Monad
m
]
(
t
:
NameTrie
β
)
(
k
:
Name
)
(
f
:
β
→
m
Unit
)
:
m
Unit
Equations
Instances For
source
@[inline]
def
Lean
.
NameTrie
.
forM
{
m
:
Type
→
Type
u_1
}
{
β
:
Type
u_2}
[
Monad
m
]
(
t
:
NameTrie
β
)
(
f
:
β
→
m
Unit
)
:
m
Unit
Equations
Instances For
source
def
Lean
.
NameTrie
.
matchingToArray
{
β
:
Type
u_1}
(
t
:
NameTrie
β
)
(
k
:
Name
)
:
Array
β
Equations
Instances For
source
def
Lean
.
NameTrie
.
toArray
{
β
:
Type
u_1}
(
t
:
NameTrie
β
)
:
Array
β
Equations
Instances For