<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>matarillo</author_name>
  <author_url>https://blog.hatena.ne.jp/matarillo/</author_url>
  <blog_title>HaskellとF#について書くmatarilloの日記（アーカイブ）</blog_title>
  <blog_url>https://functional-matarillo.hatenadiary.jp/</blog_url>
  <categories>
  </categories>
  <description>foldrが無限リストを扱えるというならできるはずだと思って書いてみた。 drop' n = foldr f [] . zip (trueWhile n) where trueWhile n = (replicate n True) ++ (repeat False) f (True, _) = id f (_ , x) = (:) x （追記）foldrに食わせる関数が2引数であることが分かった方が理解しやすい。 関数合成も少ない方が理解しやすい気がする。 名前はもちろん長い方が理解しやすい。 drop' n xs = foldr dropWhileTrue [] (zip trueThen…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ffunctional-matarillo.hatenadiary.jp%2Fentry%2F2011%2F05%2F09%2F224757&quot; title=&quot;foldrでdrop - HaskellとF#について書くmatarilloの日記（アーカイブ）&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-05-09 22:47:57</published>
  <title>foldrでdrop</title>
  <type>rich</type>
  <url>https://functional-matarillo.hatenadiary.jp/entry/2011/05/09/224757</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
