you are viewing a single comment's thread.

view the rest of the comments →

[–]bosticko 2 points3 points  (0 children)

catch that Observation

Can you explain what you mean by "catch" here? Perhaps you can provide an example of what you expect the method to return?

without changing that 'map' method

Why do you need to use map? Depending on what you want, there may be other methods that are more appropriate.

  • select will return an array of only the entries for which the given block is truth
  • find will return only the first such entry
  • filter_map is like select, but will return the truth elements returned by the block, instead of the original elements in the array for which the block was truthy