Applies fn to each subclass of class. If proper? is true, thenthe class itself is not included in the mapping. Proper? defaults to nil.