This project is read-only.


Returns an empty iteratable object that has the specified type argument.


Return Value

An empty iteratable object.


var names1 = [ "Hartono, Tommy" ];
var names2 = [ "Adams, Terry", "Andersen, Henriette Thaulow", "Hedlund, Magnus", "Ito, Shu" ];
var names3 = [ "Solanki, Ajay", "Hoeing, Helge", "Andersen, Henriette Thaulow", "Potra, Cristina", "Iallo, Lucio" ];

var namesList = [ names1, names2, names3 ];

// Only include arrays that have four or more elements
var allNames = $from(namesList).aggregateSeed($empty(),
	"(current, next) => next.length > 3 ? current.union(next) : current");


 This code produces the following output:

 Adams, Terry
 Andersen, Henriette Thaulow
 Hedlund, Magnus
 Ito, Shu
 Solanki, Ajay
 Hoeing, Helge
 Potra, Cristina
 Iallo, Lucio

Last edited May 20, 2012 at 1:04 AM by suckgamoni, version 2


No comments yet.