I have looked at similar questions and answers and have not found an answer that directly addresses my question. I am struggling to understand how to use Maybe or Eitheror Monads in conjunction with piping functions. I want to pipe functions togeth...
I'm trying to understand the concept of monads and I want to know if this code is an implementation of this concept (in JavaScript).  I have function M which return new object that have set method which create wrapper method  var foo = M().set(&#...
I have been reading about map, reduce and filter a lot because of how much they are used in react and FP in general. If we write something like:  let myArr = [1,2,3,4,5,6,7,8,9] let sumOfDoubleOfOddNumbers = myArr.filter(num => num % 2)...
So I want to understand the practical cases where monads in JavaScript are helpful.  I read a bunch on articles on Monads in JavaScript and understand that jQuery is one example of its use. But besides the "chaining" pattern, what other issue...
I've been reading up on Functional Reactive Programming, and though I have not used monads extensively in any language, I can't help but see them everywhere in the FRP design.  This question's answers have some fantastic descriptions of w...
I was using Bluebird for doing asynchronous stuff, but now have to do a lot of empty / null / error checks and I don't want to go down the usual if Else route. Am thinking of using monads, but have not yet grokked it completely.   Also I want it...
I try to implement the continuation monad in Javascript to handle continuation passing style and asynchronous control flows. Here is my continuation monad for learning:    // auxiliary functions  const log = prefix => x => console.log(prefix, x...
What I'm trying to do:  I want to use Node to fire up two child processes in a particular order at a particular time, console logging their stdout as they stream, occasionally switching between the two.   The output I want:  `Proc 1 log # 1` `Pro...
Note: while the code in this question deals with functional programming/monads, etc., I'm not asking about functional programming (nor do I think this question should have tags related to functional programming, etc.). Instead, I'm asking abo...
I know that Javascript's promises are technically neither functors nor monads in the sense of Haskell, because (among other things)   they include a bind operation that falls back to map when a pure function is passed in (and thus has an ambiguou...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.