mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 17:34:43 +00:00
* update c_malloc's to csize_t
fix for broken --os:ios
* I'm an idiot sorry
* Create talgorithm.nim
* workaround for #10456
I don't understand the intricacies of how lambdalifting and template expansions interact with lent, so i don't know how to fix the real problem, but this sidesteps whatever issue that is.
* working test, use typeof rather than auto
(cherry picked from commit 218acfe367)
19 lines
331 B
Nim
19 lines
331 B
Nim
discard """
|
|
output:'''@["3", "2", "1"]
|
|
'''
|
|
"""
|
|
#12928,10456
|
|
import sequtils, strutils, algorithm, json
|
|
|
|
proc test() =
|
|
try:
|
|
let info = parseJson("""
|
|
{"a": ["1", "2", "3"]}
|
|
""")
|
|
let prefixes = info["a"].getElems().mapIt(it.getStr()).sortedByIt(it).reversed()
|
|
echo prefixes
|
|
except:
|
|
discard
|
|
|
|
test()
|