Appearance
00dbd492 ​
arc
let ss: OList (Int * Int * Int)
let g: Grid
let valid =
all (λ(s, x, y). s >= 2 && s <= 4) ss
let input = g
|> fold (λ(s, x, y). frame (x - s, y - s) (x + s, y + s) red) ss
|> fold (λ(s, x, y). point (x, y) red) ss
let output = g
|> fold (λ(s, x, y). rect (x - s, y - s) (x + s, y + s) (match s with
| 2 -> teal
| 3 -> yellow
| 4 -> green
)) ss
|> fold (λ(s, x, y). frame (x - s, y - s) (x + s, y + s) red) ss
|> fold (λ(s, x, y). point (x, y) red) sscomposer
input = fill #0 (fill #1 black) |> fold (λr. rect ((r.1 - 1, r.2 - 1, r.3 + 1, r.4 + 1), red)) #2 |> fold (λr. rect (r, black)) #2 |> fold (λr. rect ((r.1, r.2, r.1, r.2), red)) #3
output = fill #0 (fill #1 black) |> fold (λr. rect ((r.1 - 1, r.2 - 1, r.3 + 1, r.4 + 1), red)) #2 |> fold rect #4 |> fold (λr. rect ((r.1, r.2, r.1, r.2), red)) #3
(VInt, HInt, UList (VInt, HInt, VInt, HInt), UList (VInt, HInt), UList ((VInt, HInt, VInt, HInt), Color))
(7v, 7h, {(2v, 2h, 4v, 4h)}, {(3v, 3h)}, {((2v, 2h, 4v, 4h), teal)})
(9v, 9h, {(2v, 2h, 6v, 6h)}, {(4v, 4h)}, {((2v, 2h, 6v, 6h), yellow)})
(15v, 15h, {(12v, 3h, 14v, 5h), (2v, 8h, 8v, 14h)}, {(13v, 4h), (5v, 11h)}, {((12v, 3h, 14v, 5h), teal), ((2v, 8h, 8v, 14h), green)})
(13v, 13h, {(8v, 7h, 12v, 11h), (2v, 3h, 4v, 5h)}, {(10v, 9h), (3v, 4h)}, {((8v, 7h, 12v, 11h), yellow), ((2v, 3h, 4v, 5h), teal)})
(20v, 20h, {(2v, 13h, 4v, 15h), (14v, 7h, 18v, 11h), (9v, 15h, 11v, 17h), (3v, 3h, 9v, 9h)}, {(3v, 14h), (16v, 9h), (10v, 16h), (6v, 6h)}, ?)