Some arrows that approach the function object from the right point to the left edge of the function object. They should point to the right edge of the function object.
Sample code:
function add_streams(s1, s2) {
return pair(head(s1) + head(s2),
() => add_streams(stream_tail(s1), stream_tail(s2)));
}
const strm = pair(1, () => pair(2, () => add_streams(strm, strm)));
eval_stream(strm, 10);
Some arrows that approach the function object from the right point to the left edge of the function object. They should point to the right edge of the function object.
Sample code:
function add_streams(s1, s2) {
return pair(head(s1) + head(s2),
() => add_streams(stream_tail(s1), stream_tail(s2)));
}
const strm = pair(1, () => pair(2, () => add_streams(strm, strm)));
eval_stream(strm, 10);