NessComputing/components-ness-jdbc — pull request #2 by hgschmie (2012-09-26 16:54:53+00:00)
Title: allow function wrappers for DBI and IDBI

I was thinking for a while that maybe a Function would work, but that implies that the appy() method would return an arbitrary supertype of DBI, so you end up with Object. That makes the functions no longer stackable.

The alternative would be Function so a function that could consume an IDBI would have to return a DBI. That makes any reasonable implementation impossible because once you have an IDBI there is no way back. Finally a Function makes the code no stackable again (because a function is then allowed to return an IDBI so a function that expects a DBI to come in would explode.

In the end, there are two distinct transformations: DBI -> DBI and IDBI -> IDBI. So there are now two binders.