lantiga / ki

lisp + mori, sweet.js
ki-lang.org
MIT License
478 stars 28 forks source link

Promises #26

Open roman01la opened 9 years ago

roman01la commented 9 years ago

Does ki handles promises?

I've tried to play around with Fetch API, fetch function does return promise, but I can't figure out what is the proper syntax for .then().catch() in ki.

lantiga commented 9 years ago

http://ki-lang.org/api.html#chain should work in your case

(chain an_obj_or_a_form_returning_one (then arg) (catch arg))

Let me know if this is not the case.