3 ms·
The above, only if you want to discard (filter) orders with an even number of things. Also I'm not sure about the use of floating point here...
by sk5t 11y ago
The above, only if you want to discard (filter) orders with an even number of things.
Also I'm not sure about the use of floating point here...
- kilotaras 11y agoRuby's select[1] is the same as java 8's filter[2]. [1] http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-select http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-sele... [2] https://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html#filter-java.util.function.Predicate- https://docs.oracle.com/javase/8/docs/api/java/util/stream/S...