Dyn containers print without a space after the bracket, queued
This commit is contained in:
parent
d991e1986c
commit
94134da25a
3
TODO.org
3
TODO.org
@ -304,6 +304,9 @@ compare bools, and a match over a bool takes true/false arms, exhaustive without
|
|||||||
Decided 2026-09-25: a let whose name no later statement of its block mentions prints
|
Decided 2026-09-25: a let whose name no later statement of its block mentions prints
|
||||||
flat, not as a nested block; a one-argument and/or prints as its argument.
|
flat, not as a nested block; a one-argument and/or prints as its argument.
|
||||||
|
|
||||||
|
** NEXT A dyn vector prints as [1 2 3], a map as {:a 1}
|
||||||
|
Decided 2026-09-25: no space after the opening bracket, in every renderer.
|
||||||
|
|
||||||
** WAIT ML-style patterns
|
** WAIT ML-style patterns
|
||||||
Held 2026-09-25 as a future direction, like the JS backend: nested destructuring,
|
Held 2026-09-25 as a future direction, like the JS backend: nested destructuring,
|
||||||
guards, or-patterns, literals at any depth, exhaustiveness over the nesting.
|
guards, or-patterns, literals at any depth, exhaustiveness over the nesting.
|
||||||
|
|||||||
@ -36,6 +36,18 @@ fn insertion-sort(coll: [$t]) -> () where ordered?($t)
|
|||||||
--(j)
|
--(j)
|
||||||
++(i)
|
++(i)
|
||||||
|
|
||||||
|
fn insertion-sort-dyn(coll)
|
||||||
|
let i = 1
|
||||||
|
let length = length(coll)
|
||||||
|
while i < length
|
||||||
|
let j = i
|
||||||
|
while j > 0 and coll[j] < coll[dec(j)]
|
||||||
|
let temp = coll[j]
|
||||||
|
coll[j] = coll[dec(j)]
|
||||||
|
coll[dec(j)] = temp
|
||||||
|
--(j)
|
||||||
|
++(i)
|
||||||
|
|
||||||
fn main() -> i32 = 0
|
fn main() -> i32 = 0
|
||||||
|
|
||||||
comment:
|
comment:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user