Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> that operates on futures or regular values.

but what is the return type? The multisync example shows separate generated methods that return `string` and `Future[string]` depending on the method argument.

If that's the case then blocking and non-blocking operations need to be treated separately since operations defined on a result of `Future[string]` are not the same as those available on `string`.

HKTs not only allow for both method argument and return type to be polymorphic, but also allow one to define the same operations (like map, flatMap/bind, fold, etc.) on the wrapped type.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: