Handbook
Glossary
sort-by-set-colors ( seq -- seq' )
Vocabulary
scryfall
Inputs
seq
an
object
Outputs
seq'
an
object
Definition
USING:
assocs
calendar.parser
kernel
math.order
sequences
sorting
sorting.specification
;
IN:
scryfall
:
sort-by-set-colors
( seq -- seq' )
{
{
[
"released_at"
of
ymd>timestamp
]
<=>
}
{
[
"set"
of
]
<=>
}
{
[
"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
?
]
<=>
}
{
[
"rarity"
of
-1 1
?
]
<=>
}
{
[
"name"
of
]
<=>
}
}
sort-with-spec
;