2h
comment Call Continuation CC in Scheme
see if this helps.
7h
comment SICP terminology : difference between procedure and operation
no. leave it be. for now. :) Rainer Joswig is no troll though. Really. ----- the images are extremely nice; it's not for nothing that the PDF is called "nice".
14h
comment Why do we need monads?
Your answer is right in the sense that monads IMO indeed are best described as being about the composition/ality of "functions" (Kleisli arrows really), but the precise details of what type goes where are what makes them "monads". you could wire the boxes in all kinds of manners (like Functor, etc.). This specific way of wiring them together is what defines "the monad".
14h
comment Why do we need monads?
"6. 2. Have a composer/linker g >>= f to help connecting g's output to f's input, so we don't have to change any f at all." this is not right at all. Before, in f(g(x,y)), f could produce anything. It could be f:: Real -> String. With "monadic composition" it must be changed to produce Maybe String, or else the types won't fit. Moreover, >>= itself doesn't fit!! It's >=> that does this composition, not >>=. See the discussion with dfeuer under Carl's answer.
1d
comment Switching streams in RX: Sodium's equivalent of merge and switch in RX
@JamesWorld "(shouldn't the question be the target of the evaluation rather than the OP per se?)" your are absolutely right; moreover it should be a target not only of evaluation but also of efforts to improve it - which is exactly what you did!! Kudos to you for that! :)
1d
comment Terminology in book "FP in Scala" : "we can treat the objects of our APIs as black boxes"
so in other words it could be said, "we can rely on them to behave the same way (re: API) in all circumstances". Here's an example: a simple generator of consecutive integers, from a starting number that we specify when we start it. If it hides the counter inside, so no code outside has access to it ("encapsulation"), we can rely on it to produce a sequence of integers in order. But if it uses a global variable to hold its current value, then it can't be relied upon anymore - some other code could change the value of that counter, and thus the produced numbers won't be in order.
1d
comment Terminology in book "FP in Scala" : "we can treat the objects of our APIs as black boxes"
the accepted general meaning of "black box" AFAIUI, is with respect to what's inside them. It's only defined by how it interacts with the outer world, and we don't know/don't care what's inside, and how it does what it does - only what it does (i.e. how in interacts). That's a general answer, don't know about this book specifically.
1d
comment Terminology in book "FP in Scala" : "we can treat the objects of our APIs as black boxes"
clearly, this use is fair. (and on that other question it was, too - you didn't just post pages for others to just read in circumvention of copyright, it was only some specific pages, needed in the context of your question - obviously for learning).
1d
comment Iterate over all pair combinations without repetition in Haskell
you've improved even this old trite subject, with explicit iteration instead of the usual recursive code!
1d
revised How to reverse the order of elements of a list in Scheme
added 71 characters in body
2d
comment How to implement zip with foldl (in an eager language)
looks much more straightforward, in a hindsight. foldl and snoc (conj) go together just like the foldr and cons do.
Jan
26
comment Sieve of eratosthenes animation
all multiples of 5 are enumerated as 5, 10, 15, 20, ... by iterated addition. no need to test any remainders, just add 5 (or 7, 11, etc.) repeatedly.
Jan
26
comment Prolog and List Unification
glad to help____
Jan
26
comment Prolog and List Unification
of compound terms, more correctly. functor is a part of a compound term, along with the arguments. You asked about unification for lists, and I tried to answer that.
Jan
26
revised Prolog and List Unification
added 559 characters in body
Jan
26
answered Prolog and List Unification
Jan
26
revised Memory representation of values in Lisp
added 6 characters in body
Jan
25
reviewed Reject suggested edit on foldr lambda representation - Haskell
Jan
25
revised foldr lambda representation - Haskell
added 159 characters in body
Jan
25
answered foldr lambda representation - Haskell
1 2 3 4 5