Boost logo

Boost Users :

Subject: [Boost-users] Odd limitation in Fusion design ?
From: John Dlugosz (JDlugosz_at_[hidden])
Date: 2010-07-07 20:40:18

I see that the "Cons" sequence is Forward-only.
reverse_view requires a Bidirectional sequence, at least.
The for_each iteration function goes forward.

However, hand-written recursive loop on a cons-like thing can do stuff before and other stuff after the recursive call to the cdr portion. Putting stuff "after" will give a reversed processing. So, in general, a reversed_for_each is not out of the question, and can be specialized for Cons when the general form of iterating backwards does not work.

I also ponder that a more general form that indeed does stuff before AND other stuff after recursing the tail would be a useful addition. It might actually perform one operation iterating forward, then perform the other operation iterating backward back to the beginning; or use recursion; depending on the nature of the container.


TradeStation Group, Inc. is a publicly-traded holding company (NASDAQ GS: TRAD) of three operating subsidiaries, TradeStation Securities, Inc. (Member NYSE, FINRA, SIPC and NFA), TradeStation Technologies, Inc., a trading software and subscription company, and TradeStation Europe Limited, a United Kingdom, FSA-authorized introducing brokerage firm. None of these companies provides trading or investment advice, recommendations or endorsements of any kind. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at