b***e 发帖数: 1419 | |
p*****2 发帖数: 21240 | 2 那就跟future差不多了?
【在 b***e 的大作中提到】 : Yield就是bind.
|
l**********n 发帖数: 8443 | 3 大牛举个promise结合generator的例子,最好是recursive, infinite, generator是不
是可以call next to check whether it has more items. if the recursion can
conditionally exit , it is better
【在 b***e 的大作中提到】 : Yield就是bind.
|
n*w 发帖数: 3393 | 4 f#的monad yield和bind都有。两个倒是不同。
【在 b***e 的大作中提到】 : Yield就是bind.
|
p*****2 发帖数: 21240 | 5
zkss?
【在 n*w 的大作中提到】 : f#的monad yield和bind都有。两个倒是不同。
|
n*w 发帖数: 3393 | 6 f#的 let!, do!和use!desugar后就是bind。yield和yield!分别是yield和yieldfrom
。用来产生多个结果(monoids)。这个是其和haskell monad不同点之一。
【在 p*****2 的大作中提到】 : : zkss?
|
b***e 发帖数: 1419 | 7 Sounds like a built-in list monad. Yes, list monad is a singlarity in the
context of node.js. Node.js can only support it if a generator object can
be cloned. I didn't figure out how to do that. But I think list monad (aka
monoids) is more confusing than useful to most people most of the time.
yieldfrom
【在 n*w 的大作中提到】 : f#的 let!, do!和use!desugar后就是bind。yield和yield!分别是yield和yieldfrom : 。用来产生多个结果(monoids)。这个是其和haskell monad不同点之一。
|