Skip to content

Commit

Permalink
Stream.of and from
Browse files Browse the repository at this point in the history
  • Loading branch information
kemsky committed Nov 2, 2015
1 parent b9a34ff commit d8bf0bf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/com/kemsky/Stream.as
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,8 @@ package com.kemsky

/**
* Creates Stream object from iterable object
* @param object object used as source for a Stream
* @param object object used as source for a stream
* @param callback callback used to map result Stream
* @return created Stream object
* @example
* <pre>
Expand All @@ -1906,7 +1907,7 @@ package com.kemsky
* //prints ["name1", "name2"]
* </pre>
*/
public static function from(object:*, map:Function = null):Stream
public static function from(object:*, callback:Function = null):Stream
{
var result:Stream;
if (object == null || object === undefined)
Expand Down Expand Up @@ -1951,7 +1952,7 @@ package com.kemsky
result = result.sortOn("first");
}

return map == null ? result : result.map(map);
return callback == null ? result : result.map(callback);
}
}
}

0 comments on commit d8bf0bf

Please sign in to comment.