public static Range range(Collection<String> col, F1<String, Integer> f) {
        Range ret = new Range();
        for (String s : col) {
            Integer val = f.e(s);
            if (ret.getFrom() == null) {
                ret.setFrom(val);
                ret.setTo(val);
            } else {
                if (ret.getFrom() > val) {
                    ret.setFrom(val);
                }
                if (ret.getTo() < val) {
                    ret.setTo(val);
                }
            }
        }
        return ret;
    }