Skip to content

Commit

Permalink
Solutions updated according to issues reported in #1
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiiz committed Feb 4, 2017
1 parent 72c0606 commit 9878844
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public Observable<String> listNameOfEachCountry(List<Country> countries) {
@Override
public Observable<Country> listOnly3rdAnd4thCountry(List<Country> countries) {
return Observable.fromIterable(countries) // solution
.skip(3)
.skip(2)
.take(2);
}

Expand Down Expand Up @@ -68,7 +68,7 @@ public Observable<String> getCurrencyUsdIfNotFound(String countryName, List<Coun
return Observable.fromIterable(countries) // solution
.filter(country -> country.name.equals(countryName))
.map(country -> country.currency)
.defaultIfEmpty("USD (default)");
.defaultIfEmpty("USD");
}

@Override
Expand Down

0 comments on commit 9878844

Please sign in to comment.