Generic observer

Generic observer inspired by Java Generics and Collection by Naftalin & Wadler