我正在使用Netcat for Windows但是当我尝试打开连接时出现此错误:
nc forward host lookup failed h_errno 11001 host_not_found
Run Code Online (Sandbox Code Playgroud)
有什么问题?
我正在尝试通过列表实现集合..这是带有实现的代码(我省略了接口):
module MySet : Set =
struct
type 'a set = 'a list
let empty : 'a set = []
let add (x: 'a) (s: 'a set) : 'a set =
if not(List.mem x s) then x::s
let remove (x: 'a) (s: 'a set) : 'a set =
let rec foo s res =
match s with
| [] -> List.rev res
| y::ys when y = x -> foo ys res
| y::ys -> foo ys (y::res)
in foo …Run Code Online (Sandbox Code Playgroud)