Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
Tags
- QT
- Book
- Python
- agile
- hbase
- Programming
- Italy
- France
- Book review
- RFID
- Spain
- django
- ubuntu
- Kuala Lumpur
- management and leadership
- comic agile
- management
- hadoop
- programming_book
- UK
- leadership
- Malaysia
- erlang
- Linux
- program
- Software Engineering
- history
- Java
- MySQL
- web
Archives
- Today
- Total
목록foldLeft (1)
Example functional programming fold left and fold right in java
import java.util.ArrayList; import java.util.List; //http://abel-perez.com/example-functional-programming-fold-left-and public class TestFunctionalSum{ public static int foldLeft(List elements, int seed, Function function){ intaccumulated=seed; for ( final Integer element : elements ){ accumulated=function.apply(element, accumulated); } returnaccumulated; } public static void main(final String[]..
Programming/Java
2011. 4. 30. 04:28