<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>TAKOYAKING</author_name>
  <author_url>https://blog.hatena.ne.jp/TAKOYAKING/</author_url>
  <blog_title>TAKOYAKING’s blog</blog_title>
  <blog_url>https://takoyaking.hatenablog.com/</blog_url>
  <categories>
    <anon>Rust</anon>
  </categories>
  <description>Rustのmapとand_thenが最初見たときにどちらも加工するという処理なのに、どういう時に使いわけるかイメージできなかったので、まとめてみました。 (Option型にも使用できますが、例はResultにしています。) map returnの型: Result functionの型: FnOnce(T) -&gt; U (Resultではない) functionはErrなら呼ばれず、Okなら呼ばれる and_then returnの型: Result functionの型: F: FnOnce(T) -&gt; Result (Result！) functionはErrなら呼ばれず、Okなら呼ばれる …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftakoyaking.hatenablog.com%2Fentry%2Fmap_vs_and_then&quot; title=&quot;Rust: map VS and_then - TAKOYAKING’s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://www.rust-lang.org/static/images/rust-social-wide.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-03-04 09:00:00</published>
  <title>Rust: map VS and_then</title>
  <type>rich</type>
  <url>https://takoyaking.hatenablog.com/entry/map_vs_and_then</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
