interface Cell < T > { x : T ; n ? : Cell < T > ; } example param src export function * symmetric < T > ( src ) { let head = undefined ; for ( let x of src ) { head = { x , n : head } ; yield x ; } while ( head ) { yield head . x ; head = head . n ; } }