runeflobakk / motif

A Java library helping you to compose behavior from smaller parts.
http://runeflobakk.github.io/motif
6 stars 0 forks source link

flatMap on Optional and Elements #29

Closed runeflobakk closed 10 years ago

runeflobakk commented 10 years ago

Merged to dev branch 2df475c5347893eec68348da93344790f6957fbc Works as intended, but sadly haven't managed to "unify" it to an interface implemented by both Optional and Elements. Suspects the reason is that Java type system does not support "higher kinded types". However, if it is possible, I am very interested in how to achieve this.