Data stream analysis and manipulation is very common in computer systems. Practical systems usually consist of data streams of different frequencies, however, dealing with data streams with different frequencies in existing programming languages has to be done explicitly and manually in programs. This paper proposes FStream–a framework for programming data streams with different frequencies, which supports automatic calculation. FStream is designed based on functional languages and dependent type systems. We also show an encoding of a discrete-time Simulink model in FStream.