def dial
import bend-kit-postgres@0.3.0.0/postgres.bend as Postgresimport Base
435# Each address in turn, until one connects.
436def dial(ips: List<&2, String>, +port: U32, +ms: U32, acc: IO(Result<&1, &1, U32 & String, Socket>)) -> IO(Result<&1, &1, U32 & String, Socket>):
437 match ips:
438 case Nil{}:
439 acc
440 case Con{ip, t}:
441 dial(t, port, ms, dial.more(acc, ip, port, ms))