Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improving sdtlib/Stack: adding Stack.empty #3347

Closed
vicuna opened this issue May 8, 2002 · 1 comment
Closed

improving sdtlib/Stack: adding Stack.empty #3347

vicuna opened this issue May 8, 2002 · 1 comment

Comments

@vicuna
Copy link

vicuna commented May 8, 2002

Original bug ID: 1148
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hi,

I suggest to add to sdtlib/stack.ml:

let empty s =
match s.c with
| [] -> true
| _ -> false

and to stdlib/stack.mli:

val empty : 'a t -> bool
(** Test if the stack is empty. *)

Bye,

Hendrik

@vicuna
Copy link
Author

vicuna commented Jun 27, 2002

Comment author: administrator

Added Stack.is_empty and Queue.is_empty in 3.05. -XL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant