These are chat archives for ThoughtWorksInc/Binding.scala

Apr 2018
Andrzej Sołtysik
Apr 20 2018 06:23
my guess is it won't work, but you can try ;)
since AFAIK only the outer function will be @dom annotated, and the function returned from it will be out of scope of it, but I am happy to be proved wrong
杨博 (Yang Bo)
Apr 20 2018 06:26
@mcku If you are talking about methods with multiple lists of parameters, it just works as other methods.
But if you are talking about @dom on Function1 values, then you will have Binding[A => B].
It could be useful if you want to switch event handler according to upstream data changes.
Check the blurHandler in TodoMVC for instance
Apr 20 2018 16:29
@Atry redux' implementation is a bit convoluted, but in the end it's (roughly) just a bunch of dumb data structures called Action and a function type Action => State => State called Reducer.
杨博 (Yang Bo)
Apr 20 2018 18:53
Dsl has a method def interpret(keyword: Keyword, handler: (Value) ⇒ Domain): Domain
Looks like Redux
Wait... It's different. (A => B) => B is not A => B => B
I hate curried functions. I always misread them.