Handbook
Glossary
sort-by-rarity ( seq -- seq' )
Vocabulary
scryfall
Inputs
seq
an
object
Outputs
seq'
an
object
Definition
USING:
assocs
kernel
math.order
sequences
sorting
sorting.specification
;
IN:
scryfall
:
sort-by-rarity
( seq -- seq' )
{
{
[
"rarity"
of
rarity-to-number
at
]
<=>
}
{
[
"color_identity"
of
length
]
<=>
}
{
[
"color_identity"
of
sort
?first
"A"
or
]
<=>
}
{
[
"cmc"
of
]
<=>
}
{
[
"mana_cost"
of
length
]
<=>
}
{
[
"name"
of
]
<=>
}
}
sort-with-spec
;