             }));
         }
 
+        /**
+         * Executes a function on each item in the stream.
+         * @param callback The function to run on each item in the stream.
+         *         <p><code>function(item:*):void</code></p>
+         * @return Current stream
+         */
         public function forEach(callback:Function):Stream
         {
             source.forEach(function (item:*, index:int, array:Array):void


        /*
         * Array part
         * -------------------------------------------
         */

        /**

            return slice(offset, offset + count);
        }

        /**
         * Flattens a nested Streams, ArrayLists, ArrayCollections, Vectors.
         * @return
         */
        public function flatten():Stream
        {
            return flatMap(null);//todo: unlimited depth?
        }

        /**
         * Builds a new stream by applying a function to all items of this stream and using
         * the items of the resulting Streams, ArrayLists, ArrayCollections, Vectors.
         * @param callback
         * @return
         */
        public function flatMap(callback:Function):Stream
        {
            var f:Function = function (item:*):*
