This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.print(new SmartArray(new String[] { "Hello", "World!", "Java" }) | |
.map(new SmartArray.Op<String, Integer>() { | |
public Integer op(String s) { | |
return s.length(); | |
} | |
}) | |
.max()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print [ "Hello", "World!", "Ruby" ].map{|e| e.length }.max |