collect: Provide functional interface for collectors.