Version française
Home     About     Download     Resources     Contact us    
Browse thread
stack module with "top"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Markus Mottl <mottl@m...>
Subject: stack module with "top"
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