Created
December 15, 2018 09:27
-
-
Save ivancorrales/fbf0f37e91e27bb8a858bdaa59853e4d to your computer and use it in GitHub Desktop.
streamOf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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