foldr usage
reflection to the actual assignment