Skip to content

Instantly share code, notes, and snippets.

@ivancorrales
Created December 15, 2018 09:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivancorrales/fbf0f37e91e27bb8a858bdaa59853e4d to your computer and use it in GitHub Desktop.
Save ivancorrales/fbf0f37e91e27bb8a858bdaa59853e4d to your computer and use it in GitHub Desktop.
streamOf
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
var numbers = []int{1, 5, 4, 3, 2, 7, 1, 8, 2, 3}
func main() {
fmt.Printf("slice: %v\n", numbers)
stream := koazee.StreamOf(numbers)
fmt.Printf("stream: %v\n", stream.Out().Val())
}
/**
go run main.go
slice: [1 5 4 3 2 7 1 8 2 3]
stream: [1 5 4 3 2 7 1 8 2 3]
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment