type Model = Int data Action = Inc | Dec update ∷ Model → Action → Model update i = case _ of Inc → i + 1 Dec → i - 1
How could I send an Inc or Dec action from outside of the PureScript universe? To give a little context for my use case. I’m writing an app that uses JQuery select2, a multi-select picker, and I want to notify my PureScript app when an item is added or removed from the list of items (via an event). I’ve read the Spork code a bit in an effort to figure this out on my own to no avail.
Any help would be very much appreciated. Thanks!