Appearance
56ff96f3 ​
composer
input = fill #0 (fill #1 black) |> fold (λr. rect ((r.1, r.2, r.1, r.2), #2)) #3 |> fold (λr. rect ((r.1, r.2, r.1, r.2), #4)) #5
output = fill #0 (fill #1 black) |> fold rect #6
(VInt, HInt, Color, UList (VInt, HInt), Color, UList (VInt, HInt), UList ((VInt, HInt, VInt, HInt), Color))
(10v, 10h, red, {(8v, 8h), (6v, 4h)}, blue, {(4v, 2h), (2v, 7h)}, {((6v, 4h, 8v, 8h), red), ((2v, 2h, 4v, 7h), blue)})
(7v, 8h, orange, {(4v, 8h), (5v, 5h)}, green, {(5v, 3h), (2v, 2h)}, {((4v, 5h, 5v, 8h), orange), ((2v, 2h, 5v, 3h), green)})
(10v, 10h, yellow, {(7v, 6h)}, yellow, {(3v, 2h)}, {((3v, 2h, 7v, 6h), yellow)})
(6v, 11h, orange, {(4v, 8h)}, orange, {(2v, 2h)}, {((2v, 2h, 4v, 8h), orange)})
(9v, 8h, fuschia, {(8v, 2h), (5v, 6h)}, teal, {(1v, 1h), (2v, 3h)}, ?)arc
let yn: Int
let xn: Int
let ps: UList (Int, Int, Int, Int, Color)
let input = fill yn (fill xn black)
|> fold (λ(y1, x1, y2, x2, c). point (y1, x1) c) ps
|> fold (λ(y1, x1, y2, x2, c). point (y2, x2) c) ps
let output = fill yn (fill xn black)
|> fold (λ(y1, x1, y2, x2, c).
(λ(y1, y2). λ(x1, x2). rect ((y1, x1, y2, x2), c))
(if (y1 > y2) (y2, y1) (y1, y2))
(if (x1 > x2) (x2, x1) (x1, x2))
) ps