shapesecurity / shape-functional-java

add some FP familiarity to a Java project
Apache License 2.0
8 stars 7 forks source link

make Maybe iterable #74

Closed michaelficarra closed 5 years ago

michaelficarra commented 5 years ago

We currently do

for (A a : maybeA.toList()) {
  // ...
}

to "foreach" a maybe. It'd be nice to not have the intermediate list created by iterating the maybe directly.

for (A a : maybeA) {
  // ...
}
michaelficarra commented 5 years ago

Fixed by #95.