@Test
public void testFoldl() {

  List<Integer> ints = list(1, 2, 3, 4);
  assertTrue(10 == foldl(ints, 0, new Function2<Integer, Integer, Integer>() {
    @Override
    public Integer apply(Integer a, Integer b) {
      return a + b;
    }
  }));
  List<String> strings = list("vaughn", "bodé", "andré", "franquin");
  assertTrue(23 == foldl(strings, 0, new Function2<Integer, String, Integer>() {
    @Override
    public Integer apply(Integer a, String s) {
      return a + s.length();
    }
  }));
  assertTrue(5 == foldl(java.util.Collections.<Integer>emptyList(), 5, new Function2<Integer, Integer, Integer>() {
    @Override
    public Integer apply(Integer a, Integer b) {
      return a + b;
    }
  }));
}