chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] nested loop over lists


From: Jinsong Liang
Subject: [Chicken-users] nested loop over lists
Date: Wed, 13 Jul 2016 22:26:40 -0400

Hi,

I want to do nested loops over three lists like the following pseudo code:

for i in '(1 2 3)
    for j in '(4 5 6)
        for k in '(7 8 9)
          //do calculation using i, j, and k. The three lists are not related.
        end
    end
end

What is the best way to do this in Chicken? I can use (for-each ...) or (do ...) but it seems neither is straightforward.

Thank you!

Jinsong

reply via email to

[Prev in Thread] Current Thread [Next in Thread]