Can someone help: Function that generates a sequence by from the sequence

How to defined a function that generates a sequence by from the sequence passed as the third argument by taking the number of values passed as the first arguments and applying the the function passed as a second argument to them.

dependingOnPastValues : int -> (int list -> int) -> seq<int> -> seq<int>

The missing past values at the start of the sequence can be considered to be 0.

let dependingOnPastValues (count:int) (fn : int list -> int) (input:seq<int>) : seq<int> = failwith "pseudoRandom not yet implemented!"

Hi,

I’m struggling to understand what this function is meant to produce. My attempts at implementing something based on your requirements don’t seem useful, and I think I’m missing something.

Do you have some example inputs (count, fn, input) and expected outputs to show how it might work.

If I had to guess it would be some sort of fold?

Dave