Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!bbn.com!nic!chaos.cs.brandeis.edu!iad From: iad@chaos.cs.brandeis.edu (Ivan Derzhanski) Newsgroups: comp.lang.icon Subject: Help/hint needed Message-ID: <1990Nov23.205407.4570@chaos.cs.brandeis.edu> Date: 23 Nov 90 20:54:07 GMT Sender: iad@chaos.cs.brandeis.edu Organization: Brandeis University Computer Science Dept Lines: 28 SOS! I've been only using Icon for about four weeks, and I'm enjoying it more than I can tell. However, today I ran into the following problem: I was trying to write a procedure that takes a list of coexpressions (its length must be allowed to vary) and suspends lists of the corresponding values of the arguments. For example, the call f ([create 1 to 3, create "Q" | "Z"]) would produce the result sequence { [1,"Q"], [1,"Z"], [2,"Q"], [2,"Z"], [3,"Q"], [3,"Z"] }. I thought is should be easy (given the overall power of Icon), but somehow I can't think of any way of doing it without recursion. Can anyone give me a hint? Thanks, Ivan A. Derzhanski P.S. My apologies if it turns out to be actually very simple. -- Ivan A. Derzhanski iad@chaos.brandeis.edu MB 1766 Brandeis University P.O.Box 9110 Waltham, MA 02254-9110