Handbook
Glossary
assure-no-duplicates ( attrs-alist -- attrs-alist )
Vocabulary
xml
.
elements
Inputs
attrs-alist
an
object
Outputs
attrs-alist
an
object
Definition
USING:
assocs
kernel
math
sequences
xml.errors
;
IN:
xml.elements
:
assure-no-duplicates
( attrs-alist -- attrs-alist )
H{
}
clone
2dup
[
[
swap
]
]
dip
[
push-at
]
curry
compose
assoc-each
[
nip
length
2
>=
]
{
}
assoc-filter-as
[
first
first2
duplicate-attr
]
unless-empty
;