state
Lib.state : ('a,'b) istream -> 'b
Project the state of an istream.
An application state istrm
yields the value of the
current state of istrm
.
If the projection function supplied when building the stream fails on the current element of the state.
- val istrm = mk_istream (fn x => x+1) 0 (concat "gsym" o int_to_string);
> val it = <istream> : (int, string) istream
- state istrm;
> val it = "gsym0" : string
- next (next istrm);
> val it = <istream> : (int, string) istream
- state istrm;
> val it = "gsym2" : string