Figure 3.63
A series RLC circuit.

[1]
To complete in reasonable time, this calculation requires the use of the memoization optimization from section 3.5.1 in integral and in the function add_streams used in integral (using the function stream_map_2_optimized as suggested in exercise 3.57).
[2]
This is a small reflection, in JavaScript, of the difficulties that early statically typed languages such as Pascal had in coping with higher-order functions. In these languages, the programmer had to specify the data types of the arguments and the result of each function: number, logical value, sequence, and so on. Consequently, we could not express an abstraction such as map a given function fun over all the elements in a sequence by a single higher-order function such as stream_map. Rather, we would need a different mapping function for each different combination of argument and result data types that might be specified for a fun. Maintaining a practical notion of data type in the presence of higher-order functions raises many difficult issues. One way of dealing with this problem is illustrated by the language ML (Gordon, Milner, and Wadsworth 1979), whose parametrically polymorphic data types include templates for higher-order transformations between data types. Moreover, data types for most functions in ML are never explicitly declared by the programmer. Instead, ML includes a type-inferencing mechanism that uses information in the environment to deduce the data types for newly defined functions. Today, statically typed programming languages have evolved to typically support some form of type inference as well as parametric polymorphism, with varying degrees of power. Haskell couples an expressive type system with powerful type inference.
3.5.4  
Streams and Delayed Evaluation