ranging

package
v0.0.0-...-c2f863f Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2012 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromToStep

func FromToStep(from, to, step goutil.Number) channel.NumberChannel
Example
package main

import (
	"fmt"
	"github.com/earthboundkid/goutil/ranging"
)

func main() {
	for i := range ranging.FromToStep(5, -5, -2) {
		fmt.Println(i)
	}
}
Output:
5
3
1
-1
-3

func To

Example
package main

import (
	"fmt"
	"github.com/earthboundkid/goutil/ranging"
)

func main() {
	for i := range ranging.To(5) {
		fmt.Println(i)
	}
}
Output:
0
1
2
3
4

Types

This section is empty.

Jump to

Keyboard shortcuts

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