basic-usage

command
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

README

Basic Usage

This example demonstrates the fundamental operations of the iterator library.

What it shows

  • Creating iterators from slices
  • Using Next() to iterate over values
  • Using INext() to iterate with indices
  • Collecting results into slices

Run

cd examples/basic-usage
go run main.go

Key concepts

  • NewIteratorFromSlice() creates an iterator from any slice
  • slices.Collect() gathers all iterator results into a slice
  • Iterators support both value-only and indexed iteration

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL