Also to expand on why I used an empty tuple - Elm, from my understanding, will cache the call if it just returns a Bool, because it ends up looking like a constant. I don't know if, as a result, Elm will actually execute the function a second time, or if it will just return the boolean value from the first run of the call. The empty tuple forces elm to see this as a function rather than a constant, but it's a hack, and not a good practice.
On Saturday, 8 July 2017 13:26:05 UTC-4, Marek Fajkus wrote: > > I agree with Alex in all his points - ports are a better way to achieve > this. Btw () (0-tuple) is unit type ( > https://en.wikipedia.org/wiki/Unit_type). *I'm saying that only so there > is any additional value in my comment other than +1 for Alex* > -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.