Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh |
2 | * Jagannathan, and Stephen Weeks. | |
3 | * | |
4 | * MLton is released under a BSD-style license. | |
5 | * See the file MLton-LICENSE for details. | |
6 | *) | |
7 | ||
8 | functor Queue(Q: BASIC_QUEUE): QUEUE = | |
9 | struct | |
10 | ||
11 | val {error, ...} = Error.errors("queue", "queue") | |
12 | ||
13 | structure Q' = Sequence(structure I = Integer | |
14 | structure S = Q) | |
15 | ||
16 | open Q Q' | |
17 | ||
18 | fun deque q = | |
19 | case destruct q of | |
20 | SOME xq => xq | |
21 | | NONE => error "deque" | |
22 | ||
23 | end |