Re: коммивояжёр

From
Vitaly Lugovsky (2:5080/1003)
To
Vitaly Lugovsky
Date
2003-01-16T18:26:36Z
Area
RU.ALGORITHMS
.n5080.z2.fidonet.ftn> <b02f2e$lpp$1@ddt.demos.su> <3377601035@f1003.n5080.z2.fidonet.ftn>
From: Vitaly Lugovsky <vsl@ontil.ihep.su>

Vitaly Lugovsky <vsl@ontil.ihep.su> wrote:

 Oops! Обшипка в cut'n'paste

> let rec tfindl f nl =
>  let rec nxtlyr = function
>    hd :: tl ->
>     (match hd with
>       Tnode(v,l,r) -> if f v than raise (Found(v)) else
>         l::r::(nxtlyr tl)

       | Tnone -> nxtlyr tl

>      )
>   | [] -> []
>  in tfindl f (nxtlyr nl)

--- ifmail v.2.15dev5
 * Origin: (http://news.cca.usart.ru/) USURT's FidoNET<-> (2:5080/1003@fidonet)