Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 2017 Jason Carr. |
2 | * Copyright (C) 2009 Matthew Fluet. | |
3 | * Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh | |
4 | * Jagannathan, and Stephen Weeks. | |
5 | * | |
6 | * MLton is released under a BSD-style license. | |
7 | * See the file MLton-LICENSE for details. | |
8 | *) | |
9 | ||
10 | signature STREAM_STRUCTS = | |
11 | sig | |
12 | end | |
13 | ||
14 | signature STREAM = | |
15 | sig | |
16 | include STREAM_STRUCTS | |
17 | ||
18 | type 'a t | |
19 | ||
20 | val append: 'a t * 'a t -> 'a t | |
21 | val appendMap: 'a t * ('a -> 'b t) -> 'b t | |
22 | val cons: 'a * 'a t -> 'a t | |
23 | val delay: (unit -> 'a t) -> 'a t | |
24 | val empty: unit -> 'a t | |
25 | val firstN: 'a t * int -> 'a list | |
26 | val firstNSafe: 'a t * int -> 'a list | |
27 | val force: 'a t -> ('a * 'a t) option | |
28 | val fromList: 'a list -> 'a t | |
29 | val infinite: 'a * ('a -> 'a) -> 'a t | |
30 | val isEmpty: 'a t -> bool | |
31 | val keep: 'a t * ('a -> bool) -> 'a t | |
32 | val last: 'a t -> 'a option | |
33 | val layout: ('a -> Layout.t) -> 'a t -> Layout.t | |
34 | val map: 'a t * ('a -> 'b) -> 'b t | |
35 | val nth: 'a t * int -> 'a | |
36 | val single: 'a -> 'a t | |
37 | val toList: 'a t -> 'a list | |
38 | end |