Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Option空でない場合は、内部の値を置き換えたいです。map(_ => newValue)like inを使用して定数関数を使用してそれを行うことができます
Option
map(_ => newValue)
Some("text").map(_ => 42)
<$Haskell ののように、もっと簡潔な方法はあり42 <$ Just "text"ますか?
<$
42 <$ Just "text"