These are chat archives for ramda/ramda
I don't think I can help with the Ramda library code itself but probably could help with tutorials, examples or sample code. I'm still learning FP but have experience writing tutorials and play code like:
I had a quick look at the rxjs code base earlier today and I just go the feeling that there is very much code there. Which makes me wonder if they use FP concepts to their fullest. I was wondering how much code would be needed to write an FRP library if one were to use ramda as a base with basic functions such as map, chain...
This is comparable to many promise libraries which may contain thousands of lines of code. Much of the functionality could be provided by using Future monads along with ramda. I am wondering if the case is similar for FRP libraries...
.then == .map– but then I’m trying to learn FP so it’s currently not a FP implementation at all. I struggle to see how to get there.
.map. Just resolve the future for me thank you very much.
.mapcan pretty much also go in
.flatMapthe opposite is not the case for event streams/observables.
.then .then .then. doesn’t matter whether it’s a vanilla value or a deferred.
.mapaware of observables/event streams and we could go
.map .map .map
flatMapthen it doesn't really matter what they do. But if you're trying to implement some
Monadspec, then at least one of them is broken.
map, for instance, accepts a function and a list, and does the obvious thing. But we do overload it so that if you pass in a non-list with a
mapmethod, then we delgate to that method. It's not perfect, but it does give us an FP integration with FantasyLand and other third-party libraries and specifications. I'd actually like to expand this further.