Skip to content

Instantly share code, notes, and snippets.

View rwray's full-sized avatar

Ryan Wray rwray

View GitHub Profile
@rwray
rwray / HOF.scala
Last active December 26, 2015 12:49 — forked from samskivert/HOF.scala
// Say we have a List of names and we would like to find all those names where "am" occurs:
{
// LINQ
// string[] names = { "Sam", "Pamela", "Dave", "Pascal", "Erik" };
// List<string> filteredNames = names.Where(c => c.Contains("am"))
// .ToList();
// Java Streams
// String[] names = {"Sam","Pamela", "Dave", "Pascal", "Erik"};
// List<String> filteredNames = stream(names)