Skip to content

Instantly share code, notes, and snippets.

@manveru
Created April 14, 2010 13:56
Show Gist options
  • Save manveru/365838 to your computer and use it in GitHub Desktop.
Save manveru/365838 to your computer and use it in GitHub Desktop.
package main
import "fmt"
import "exp/iterable"
func main(){
a := iterable.IntArray{1,2,3,4}
fmt.Println(a)
iter := iterable.Map(a, func(i interface{})(interface{}){ return i.(int) * 3 })
for e := range iter.Iter() {
fmt.Println(e)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment