equal
deleted
inserted
replaced
1 (* Title: sequence |
1 (* Title: sequence |
2 ID: $Id$ |
2 ID: $Id$ |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
3 Author: Lawrence C Paulson, Cambridge University Computer Laboratory |
4 Copyright 1988 University of Cambridge |
4 Copyright 1988 University of Cambridge |
5 *) |
|
6 |
5 |
7 (*Unbounded sequences implemented by closures. |
6 Unbounded sequences implemented by closures. |
8 |
7 |
9 Could use 'a seq = Seq of ('a * (unit -> 'a seq)) option. |
8 RECOMPUTES if sequence is re-inspected. |
10 Recomputes if sequence is re-inspected; memoing would need polymorphic refs. |
9 |
|
10 Memoing, using polymorphic refs, was found to be slower! (More GCs) |
11 *) |
11 *) |
12 |
12 |
13 |
13 |
14 signature SEQUENCE = |
14 signature SEQUENCE = |
15 sig |
15 sig |