def dial
import bend-kit-redis@0.3.0.0/redis.bend as Redisimport Base
955# Each address in turn, until one connects.
956def dial(ips: List<&2, String>, +port: U32, +ms: U32, acc: IO(Result<&1, &1, U32 & String, Socket>)) -> IO(Result<&1, &1, U32 & String, Socket>):
957 match ips:
958 case Nil{}:
959 acc
960 case Con{ip, t}:
961 dial(t, port, ms, dial.more(acc, ip, port, ms))