Please grab the ZIP file and follow the instructions in README.md. Turn in your completed files to the dropbox.
3/13/17 4:35pm: I have improved the description of whileSomeStateful in Problem 2. You can view the new description below, or by downloading a fresh copy (either via the ZIP or directly).
(* Like `whileSome`, except that it takes a more general function
instead of just a thunk. The function takes an argument
representing the "current state", and returns an optional pair
consisting of the new state and the next element of the
stream. The second argument represents the initial value of the
state. Note that the states do not appear in the resulting
stream; they are only used internally by the thunk. *)
val whileSomeStateful : ('a -> ('a * 'b) option) -> 'a -> 'b stream