algorithms are lazy<sup>[<aname="id1025231"href="#ftn.id1025231"class="footnote">10</a>]</sup> and non sequence-type preserving <sup>[<aname="id1025259"href="#ftn.id1025259"class="footnote">11</a>]</sup>. This is by design. Runtime efficiency is given a high priority.
Like <ahref="http://www.boost.org/libs/mpl/index.html"target="_top">MPL</a>, and
fusion algorithms are mostly functional in nature such that algorithms are
non mutating (no side effects). However, due to the high cost of returning
full sequences such as vectors and lists, <spanclass="emphasis"><em>Views</em></span> are returned
from Fusion algorithms instead. For example, the <aclass="link"href="algorithm/transformation/functions/transform.html"title="transform"><codeclass="computeroutput"><spanclass="identifier">transform</span></code></a> algorithm does not actually
return a transformed version of the original sequence. <aclass="link"href="algorithm/transformation/functions/transform.html"title="transform"><codeclass="computeroutput"><spanclass="identifier">transform</span></code></a> returns a <aclass="link"href="view/transform_view.html"title="transform_view"><codeclass="computeroutput"><spanclass="identifier">transform_view</span></code></a>. This view holds a
the <aclass="link"href="view/transform_view.html"title="transform_view"><codeclass="computeroutput"><spanclass="identifier">transform_view</span></code></a>
The <spanclass="emphasis"><em>lazy</em></span> evaluation scheme where <aclass="link"href="algorithm.html"title="Algorithm">Algorithms</a>
return <aclass="link"href="view.html"title="View">Views</a> also allows operations such
as <aclass="link"href="algorithm/transformation/functions/push_back.html"title="push_back"><codeclass="computeroutput"><spanclass="identifier">push_back</span></code></a> to be totally generic. In
Fusion, <aclass="link"href="algorithm/transformation/functions/push_back.html"title="push_back"><codeclass="computeroutput"><spanclass="identifier">push_back</span></code></a> is actually a generic algorithm
that works on all sequences. Given an input sequence <codeclass="computeroutput"><spanclass="identifier">s</span></code>
and a value <codeclass="computeroutput"><spanclass="identifier">x</span></code>, Fusion's <aclass="link"href="algorithm/transformation/functions/push_back.html"title="push_back"><codeclass="computeroutput"><spanclass="identifier">push_back</span></code></a> algorithm simply returns
a <aclass="link"href="view/joint_view.html"title="joint_view"><codeclass="computeroutput"><spanclass="identifier">joint_view</span></code></a>:
a view that holds a reference to the original sequence <codeclass="computeroutput"><spanclass="identifier">s</span></code>
and the value <codeclass="computeroutput"><spanclass="identifier">x</span></code>. Functions
Except for some special cases such as <aclass="link"href="algorithm/iteration/functions/for_each.html"title="for_each"><codeclass="computeroutput"><spanclass="identifier">for_each</span></code></a> and <aclass="link"href="algorithm/auxiliary/functions/copy.html"title="copy"><codeclass="computeroutput"><spanclass="identifier">copy</span></code></a> which are inherently imperative