I'm finally making some real progress!
As a Haskell/Purescript newbie I found it interesting that everything is like upside down... the easy stuff (coming from TS, like setting up an async listener thing for testing) is hard, while the hard stuff like working with category things is easy
This is also a great way to learn Purescript/Haskell - thanks for the green light @the-real-blackh!
I do have a few questions as I slowly journey onwards:
I've mirrored the Stream constructor 1:1, but since Vertex is an internal-only thing, should I just disallow creating a Stream with a custom Vertex (i.e. newStream will always just pass null) ?
Any ideas on how to handle the lambda dependency wrapper alternatives?
Fwiw I really like how it's going so far, without the lambdas, and I'm also secretly hoping that one day this will be naturally resolved (i.e. by the JS engines gettting finalizers), so I'm thinking to just have totally separate duplicates - i.e. mapWithLambda
, snapshotWithLambda
, etc. It'll be a lot more functions but for the end user, in most cases, I'd assume it won't add much noise.
Similarly I'm not really sure how to use ADT's or Typeclasses for this sort of polymorphism, at least not without adding a whole bunch of pattern matching checks (on one foot) - so this may be the the cleanest approach on the library side too?