Converting Module stack for a list into an array, possible?

Hello I have just made a stack module which works, but my teacher tells me it should be possible using an array?

If possible could someone give me a small tips on how to convert it?

module Stack : STACK =
struct
type 'a stack = 'a list
exception EmptyStack

let empty : 'a stack = []

let isEmpty (l : 'a list) : bool = l = []

let push ((x : 'a), (l : 'a stack)) : 'a stack = x :: l

let pop (l : 'a stack) : 'a stack = 
   match l with 
     [] -> raise EmptyStack
   | x :: xs -> xs

let top (l : 'a stack) : 'a = 
   match l with
     [] -> raise EmptyStack
   | x :: xs -> x

Essentially you want to record where the top of the stack is.

The numbering is not as trivial as you think though, so make sure you have some tests.

The core principle mentioned above is pretty well known, so if you want to do something interesting, you can be creative with how you grow the stack.