A

Admin • 828.03K Points
Coach

Q. What does `.map()` do on an Option type?

  • (A) Converts Option into Result
  • (B) Applies a function to the value if it is Some
  • (C) Clones the value
  • (D) Returns the same Option
  • Correct Answer - Option(B)
  • Views: 10
  • Filed under category Rust
  • Hashtags:

Explanation by: Admin
`map()` applies a function to the value inside a `Some`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.