Handbook
Glossary
sort-by-colors ( 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-colors
( seq -- seq' )
{
{
[
"color_identity"
of
length
]
<=>
}
{
[
"color_identity"
of
sort
?first
"A"
or
]
<=>
}
{
[
"cmc"
of
]
<=>
}
{
[
"mana_cost"
of
length
]
<=>
}
{
[
"creature"
any-type?
-1 1
?
]
<=>
}
{
[
"power"
of
-1 1
?
]
<=>
}
{
[
"toughness"
of
-1 1
?
]
<=>
}
{
[
"name"
of
]
<=>
}
}
sort-with-spec
;