Skip to content
On this page

639f5a19 ​

arc
let rs: OList (Int, Int, Int, Int)

let input = fill 23 (fill 23 black)
  |> fold (λr. rect (r, teal)) rs

let output = fill 23 (fill 23 black)
  |> fold (λ(y1, x1, y2, x2). λg. g
    |> rect ((y1, x1, (y1 + y2) / 2 - 1, (x1 + x2) / 2 - 1), fuschia)
    |> rect (((y1 + y2) / 2, x1, y2, (x1 + x2) / 2 - 1), red)
    |> rect ((y1, (x1 + x2) / 2, (y1 + y2) / 2 - 1, x2), blue)
    |> rect (((y1 + y2) / 2, (x1 + x2) / 2, y2, x2), green)
    |> rect ((y1 + 2, x1 + 2, y2 - 2, x2 - 2), yellow)
  ) rs
composer
input = fill 23v (fill 23h black) |> rect (#0, teal) |> fold (λr. rect ((r.1, #1, r.2, #2), teal)) #3
output = fill 23v (fill 23h black) |> fold rect #4 |> fold (λr. rect (r, yellow)) #5
((VInt, HInt, VInt, HInt), HInt, HInt, UList (VInt, VInt), UList ((VInt, HInt, VInt, HInt), Color), UList (VInt, HInt, VInt, HInt))
((11v, 8h, 20v, 19h), 3h, 10h, {(2v, 9v)}, {((16v, 14h, 20v, 19h), green), ((16v, 8h, 20v, 13h), red), ((11v, 14h, 15v, 19h), blue), ((11v, 8h, 15v, 13h), fuschia), ((6v, 7h, 9v, 10h), green), ((6v, 3h, 9v, 6h), red), ((2v, 7h, 5v, 10h), blue), ((2v, 3h, 5v, 6h), fuschia)}, {(13v, 10h, 18v, 17h), (4v, 5h, 7v, 8h)})
((15v, 2h, 22v, 13h), 6h, 17h, {(2v, 11v)}, {((19v, 8h, 22v, 13h), green), ((19v, 2h, 22v, 7h), red), ((15v, 8h, 18v, 13h), blue), ((15v, 2h, 18v, 7h), fuschia), ((7v, 12h, 11v, 17h), green), ((7v, 6h, 11v, 11h), red), ((2v, 12h, 6v, 17h), blue), ((2v, 6h, 6v, 11h), fuschia)}, {(17v, 4h, 20v, 11h), (4v, 8h, 9v, 15h)})
((5v, 13h, 18v, 22h), 4h, 9h, {(16v, 21v), (2v, 11v)}, ?, ?)