23 lines
357 B
Text
23 lines
357 B
Text
|
enum := import("enumx")
|
||
|
fmt := import("log")
|
||
|
|
||
|
object := {
|
||
|
key1: "cock",
|
||
|
key2: "dick",
|
||
|
key3: "check",
|
||
|
key4: "die",
|
||
|
key5: "wasd"
|
||
|
}
|
||
|
keys := enum.keys(object)
|
||
|
values := enum.values(object)
|
||
|
|
||
|
sorted_values := enum.sort(values, func(a, b){
|
||
|
return b < a
|
||
|
})
|
||
|
|
||
|
ia := [5, 100, 531, 7537, 1, 2, -100, 1.535]
|
||
|
fmt.println(enum.sort(ia))
|
||
|
fmt.println(sorted_values)
|
||
|
|
||
|
|