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 | 31 |
Tags
- UK
- management
- Programming
- Spain
- erlang
- Italy
- agile
- Malaysia
- programming_book
- France
- hadoop
- hbase
- management and leadership
- Python
- Linux
- django
- Software Engineering
- MySQL
- Kuala Lumpur
- Book
- program
- ubuntu
- Java
- Book review
- RFID
- comic agile
- web
- leadership
- QT
- history
Archives
- Today
- Total
목록Functional (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