mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2024-11-22 04:36:02 +03:00
added composed call
This commit is contained in:
parent
4d46aaefac
commit
6808953da8
@ -18,6 +18,10 @@ func main() {
|
||||
// Consume the output.
|
||||
fmt.Println(<-out) // 4
|
||||
fmt.Println(<-out) // 9
|
||||
|
||||
for n := range sq(sq(gen(2, 3))) {
|
||||
fmt.Println(n) // 16 then 81
|
||||
}
|
||||
}
|
||||
|
||||
//The first stage, gen, is a function that converts a list of integers to a channel that emits the integers in the list.
|
||||
|
Loading…
Reference in New Issue
Block a user