如何将列表 v1::v2::vn::[] 转换为队列?这就是我到目前为止所写的所有内容:-
let fromList (l:'a list) : 'a queue =
let queue = create () in
let rec loop (z: 'a list) (q: 'a queue) : 'a queue =
begin match z with
| [] -> None
| hd :: tl ->
end
谢谢!