mirror of
https://github.com/crazybber/awesome-patterns.git
synced 2025-02-16 21:53:13 +03:00
added composed call
This commit is contained in:
parent
4d46aaefac
commit
6808953da8
@ -18,6 +18,10 @@ func main() {
|
|||||||
// Consume the output.
|
// Consume the output.
|
||||||
fmt.Println(<-out) // 4
|
fmt.Println(<-out) // 4
|
||||||
fmt.Println(<-out) // 9
|
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.
|
//The first stage, gen, is a function that converts a list of integers to a channel that emits the integers in the list.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user