Is it possible to add some "syntax sugar" to core? https://github.com/leonoel/missionary/pull/121
Out of curiosity, do you need that often to run a task and return a fix value afterward. It seems very specific. I dont see any pattern where someone need that regularly π€ I see functions of the api as raw building blocks that mostly give orthogonal features to compose with. When something is added to core, it stays there "forever". Some sugar syntax are just better off in a separated lib :my-2Β’:
For example bunch of parallel http-requests of multiple types. One part of types returns data needed to persist in database, another part returns data you do not care about and need just side-effects. For effective filtering in join function would be nice to have nil from second part.
Your concerns about sugar in api making sense, yes. Thatβs always a trade off
imo I would appreciate such things in the missionary wiki as pattern rather than adding sugar to the library. One thing that made learning missionary simpler to me is that nearly everything in the API is primitive/essential (except maybe amb sugar).
In my experience, what can be written directly as clojure in sp/ap is usually not worth an abstraction. I will not add this to core because otherwise there would be no reason to not add hundreds more similar variations. I value minimalism, my goal for the core namespace is to have no more operators than necessary, such that all what is possible to do with the library can fit in an average brain. The opposite direction, which I want to avoid, would lead to something like this : http://reactivex.io/RxJava/3.x/javadoc/io/reactivex/rxjava3/core/Flowable.html - a combinatorial explosion of operators obfuscating the small set of essential concepts they're derived from.
That makes sense