@Test public void testFoldl() { String fold = mlist(new Integer[]{1, 2, 3}).foldl("", new Function2<String, Integer, String>() { @Override public String apply(String s, Integer a) { return s + a + a; } }); assertEquals("112233", fold); }
public static <A> ListMonadic<A> mlist(final Collection<A> as) { return mlist(new ArrayList<A>(as)); }
Monadics { public static <A> ListMonadic<A> mlist(final Collection<A> as) { return mlist(new ArrayList<A>(as)); } }
Monadics { public static <A> ListMonadic<A> mlist(final Collection<A> as) { return mlist(new ArrayList<A>(as)); } private  Monadics(); }
Monadics { public static <A> ListMonadic<A> mlist(final Collection<A> as) { return mlist(new ArrayList<A>(as)); } private  Monadics(); static ListMonadic<A> mlist(final Collection<A> as); static ListMonadic<A> mlist(final List<A> as); static ListMonadic<A> mlist(final A... as); static ListMonadic<A> mlist(final Iterator<A> as); static IteratorMonadic<A> mlazy(final Iterator<A> as); static IteratorMonadic<A> mlazy(final List<A> as); }
Monadics { public static <A> ListMonadic<A> mlist(final Collection<A> as) { return mlist(new ArrayList<A>(as)); } private  Monadics(); static ListMonadic<A> mlist(final Collection<A> as); static ListMonadic<A> mlist(final List<A> as); static ListMonadic<A> mlist(final A... as); static ListMonadic<A> mlist(final Iterator<A> as); static IteratorMonadic<A> mlazy(final Iterator<A> as); static IteratorMonadic<A> mlazy(final List<A> as);  }