iterate.carbon 469 B

1234567891011121314
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. package Core library "prelude/iterate";
  5. export import library "prelude/types/optional";
  6. interface Iterate {
  7. let ElementType:! type;
  8. let CursorType:! type;
  9. fn NewCursor[self: Self]() -> CursorType;
  10. fn Next[self: Self](cursor: CursorType*) -> Optional(ElementType);
  11. }