thank you very much Nikita
by playing with anonymous functions vs partial applications i got exactly
the behaviour i was after!
that's awesome :-)
Jay
On Friday, March 24, 2017 at 7:00:41 AM UTC+7, Nikita Beloglazov wrote:
>
> Yes, middleware runs exactly once so you can't redefine it. In the exa
Yes, middleware runs exactly once so you can't redefine it. In the example
with fill-background you can redefine fill-backgfound:
(def fill-background [draw-fn] (draw-fn))
Which essentially makes it identify. So that's would be my recommendation:
put all logic to fill-background and let fill-b
hi Nikita
thank you so much for your explanation, it's very clear (and a bit
surprising to learn that partial and anonymous functions have a slightly
different semantics)
i am able to get the live coding behaviour when i redefine fill-background (as
per your example, and that's great that it i
Hi Jay
Yes, draw and update functions support live coding out-of-box. It's
trickier with middleware. The main thing is that middleware run once, when
initializing sketch. The goal of middleware is to take user provided
settings (like draw and update funcitons), optionally wrap some of them in