Closed codereport closed 3 months ago
While trying to solve Leetcode 3074. Apple Redistribution into Boxes, couldn't figure out how to spell the D2 combinator.
Solutions in BQN:
1‿3‿2 (1+·+´+´⊸>⟜(+`∨)) 4‿3‿1‿5‿2 1‿3‿2 {1++´(+´𝕨)>+`∨𝕩} 4‿3‿1‿5‿2
D2 is spelt: l f : g : r h where d2(f, g, h) = x, y -> g(f(x), h(y)).
l f : g : r h
d2(f, g, h) = x, y -> g(f(x), h(y))
The solution to the stated problem is below. Note the combinator tree is all wrong.
While trying to solve Leetcode 3074. Apple Redistribution into Boxes, couldn't figure out how to spell the D2 combinator.
Solutions in BQN: