[ create a new paste ] login | about

Link: http://codepad.org/bU0hbjig    [ raw code | fork ]

aaronla - Plain Text, pasted on Jul 31:
1
2
3
4
5
6
7
8
9
10
11
> function *adding() { for (;;) { yield ((yield null) + (yield null)); }}
undefined
> it = adding()
{}
> it.send(2)
{ value: null, done: false }
> it.send(3)
{ value: null, done: false }
> it.next()
{ value: NaN, done: false }
>


Create a new paste based on this one


Comments: