Skip to content

Comment on Roy — small functional language that compiles to JavaScriptparent

Comments

Actually, there are already monadic interfaces for Javascript async code with widespread use. Promises!

http://dojotoolkit.org/reference-guide/dojo/Deferred.html http://api.jquery.com/category/deferred-object/

new deferred objects can be created manually or obtained from say, an AJAX function (this is the equivalent of "return")

async operations can be chained with the deferred.then method (this is a hybrid of "fmap" and ">>=", aka "bind")

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.