This is the dumbest shit code I've seen in years. I don't think IHBT as there's not even a joke here.
Name:
Anonymous2016-07-06 19:20
// AbstractSingletonBeanConsFactory.java template <typename T> class AbstractSingletonListConsFactory { // TODO lookup how to do templates in Java public static void cons(T x, List<T> xs) { xs.add(0, x); return xs; } }
// InfinityCodeBean.java class InfinityCodeBean { private static List<Integer> fillList(Integer upto) { if (upto < 0) { return new ArrayList<Integer>(); } return AbstractSingletonListConsFactory::cons(upto, InfinityCodeBean::fillList(upto-1)); } public static void infinitize() { ArrayList<Integer> lst = InfinityCodeBean::fillList(10); while (1) { System.out.println(lst.get(0)); } } }
Name:
Anonymous2016-07-06 20:07
>>6 Sir i tested your code but have the infinity problem Can you give me the working code? thank you sir
Name:
Anonymous2016-07-06 20:56
check Em
Name:
Anonymous2016-07-06 21:50
>>7 I don't have the infinity problem. My code is the infinity. Bow before its magnitude.