java implementation of map/select/reduce/fold for any type with lazy evaluation based on Iterator