iterable

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package iterable provides an Iterable type that is capable of converting sequences of empty interface such as slice and channel to an Iterator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterable

type Iterable <-chan interface{}

Iterable converts channel and slice into an Iterator.

func New

func New(any interface{}) (Iterable, error)

New creates a new Iterable from a slice or a channel of empty interface.

func (Iterable) Next

func (it Iterable) Next() (interface{}, error)

Next returns the next element in an Iterable sequence and an error when it reaches the end. Next registers Iterable to Iterator.

Jump to

Keyboard shortcuts

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