Open nilp0inter opened 3 years ago
I looked at that a while ago. If I remember correctly it kept adding elements instead of keeping the elements constant. The rendered output still looked ok though since the outdated elements were hidden and the current ones visible.
I may be missing something but it seems to me that once the outdated elements and the current one are merged then you'd have a proper Monad instance.
So, if I understood it correctly. Although innerFlare
is a candidate for bind
and the generated code works, it is not performant. And the best route for UI
to have a monadic interface would be to write a version of bind
that results in cleaner code.
Am I right?
I have to admit that it has been to long since I worked with this code. I can not answer your questions without taking a deeper look myself. Maybe @rintcius can help?
I also can't remember much more than what I wrote above. Maybe it's possible to solve this with just a new bind
implementation, but maybe some things in the javascript code part needs to be changed too (I remember I was looking at the latter).
You can easily see the problem using innerFlare
though, by just adding the monad instance, writing a little example and watch what happens with the DOM.
I am new to PS, so please forgive me if I am asking a silly question.
Given that
UI
is already an instance ofFunctor
with a candidate implementation forbind
, namely innerFlare. WhyUI
is not a Monad instance?