[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [dev-serveez] request for scheme
From: |
stefan |
Subject: |
Re: [dev-serveez] request for scheme |
Date: |
Tue, 19 Jun 2001 23:46:54 +0200 (CEST) |
On Tue, 19 Jun 2001, Martin Grabmueller wrote:
> I'm not sure I got what you're aiming at, but what about the
> following (beware, untested):
>
> (define (bind-servers! . args)
> (let ((server-list '()) ;; Initialize lists.
> (port-list '()))
>
> ;; Iterate over argument list, separating ports from servers.
> (for-each
> (lambda (elem)
> (cond ((serveez-port? elem)
> (set! port-list (cons elem port-list)))
> ((serveez-server? elem)
> (set! server-list (cons elem server-list)))))
> args)
>
> ;; Iterate over server list and ..
> (for-each
> (lambda (server)
> ;; ... for each server, iterate over port list and ...
> (for-each
> (lambda (port)
> ;; ... bind each port to each server.
> (bind-server! port server))
> port-list))
> server-list)))
That is just, what we wanted. Perfect, Martin. Thanks. Just committed
that... Now I can imagine a routine which creates tcp ports in a loop with
the network port increasing and aftwards binding all these to one or more
servers :-)
Thanks,
address@hidden