Followup: creating fresh objects of type 'self

From: Markus Mottl (mottl@miss.wu-wien.ac.at)
Date: Sat Apr 10 1999 - 00:12:29 MET DST


From: Markus Mottl <mottl@miss.wu-wien.ac.at>
Message-Id: <199904092112.XAA23222@miss.wu-wien.ac.at>
Subject: stack module with "top"
To: caml-list@inria.fr (OCAML)
Date: Fri, 9 Apr 1999 23:12:29 +0100 (MET DST)

Hello,

Just a very small feature request: wouldn't it be nice to have a
"top"-function in the standard stack-module?

E.g.:

let top s =
  match s.c with
    hd::_ -> hd
  | [] -> raise Empty

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:22 MET