{"id":184722,"date":"2013-07-02T09:18:03","date_gmt":"2013-07-02T05:18:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=184722"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=184722","title":{"rendered":"<span class=\"post_title\">\u0422\u0440\u043e\u0439\u043a\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043c\u043e\u043d\u0430\u0434<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0438\u0436\u0435, \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u043d\u0430\u0434\u044b. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/183150\/\">\u0432\u043e\u0442 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442<\/a>!<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>half<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/cae\/b90\/f70\/caeb90f70d874d167b9c41b79f6d9936.png\"\/><\/p>\n<p>  \u0418 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437:  <\/p>\n<pre><code class=\"haskell\">half . half $ 8 =&gt; 2 <\/code><\/pre>\n<p>  \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c. \u041d\u043e \u0432\u043e\u0442 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043b\u043e\u0433 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/589\/c29\/38b\/589c2938bad51c85d798b6b6a9109331.png\"\/><\/p>\n<pre><code class=\"haskell\">half x = (x `div` 2, &quot;\u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0438\u043b  &quot; ++ (show x) ++ &quot;!&quot;) <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0436, \u043e\u0442\u043b\u0438\u0447\u043d\u043e. \u041d\u043e \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0441\u043b\u0438 \u0432\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c <code>half <\/code>\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437?  <\/p>\n<pre><code class=\"haskell\">half . half $ 8 <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b <i>\u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b<\/i>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/79d\/276\/7a6\/79d2767a62262147d45b5cd660041b34.png\"\/><\/p>\n<p>  <b>\u0421\u043f\u043e\u0439\u043b\u0435\u0440<\/b>: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0430\u043a \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u0441\u0451 \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0430\u043c\u0438:  <\/p>\n<pre><code class=\"haskell\">finalValue = (val2, log1 ++ log2)     where (val1, log1) = half 8           (val2, log2) = half val1 <\/code><\/pre>\n<p>  \u0424\u0443! \u042d\u0442\u043e \u043d\u0438 \u043a\u0430\u043f\u043b\u0438 \u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0435  <\/p>\n<pre><code class=\"haskell\">half . half $ 8 <\/code><\/pre>\n<p>  \u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u043b\u043e\u0433? \u041d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430: \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043b\u043e\u0433, \u043c\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u043b\u043e\u0433\u0438. \u042d\u0442\u043e \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u0430 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0441\u0438\u043b\u0451\u043d \u0432 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0430\u0445 \u0442\u0430\u043a, \u043a\u0430\u043a \u043c\u043e\u043d\u0430\u0434\u044b!<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>\u041c\u043e\u043d\u0430\u0434\u0430 Writer<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/8aa\/d64\/c75\/8aad64c7563305afd1f02d8c4b6236cf.png\"\/><br \/>  <i>\u041f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u043e\u043d\u0430\u0434\u0430 Writer \u043d\u0430 <s>\u0431\u0435\u043b\u043e\u043c<\/s> \u043a\u043e\u043d\u0435<\/i><br \/>  \u041c\u043e\u043d\u0430\u0434\u0430 Writer \u2014 \u043a\u0440\u0443\u0442\u0430\u044f \u043b\u0438\u0447\u043d\u043e\u0441\u0442\u044c. \u00ab\u041d\u0435 \u043f\u0430\u0440\u044c\u0441\u044f, \u0447\u0443\u0432\u0430\u043a, \u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u044e \u0442\u0432\u043e\u0438 \u043b\u043e\u0433\u0438,\u00bb \u2014 \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e\u043d\u0430. \u2014 \u00ab\u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0439\u0441\u044f \u043a \u0441\u0432\u043e\u0435\u043c\u0443 \u0447\u0438\u0441\u0442\u043e\u043c\u0443 \u043a\u043e\u0434\u0443 \u0438 \u0432\u044b\u0436\u043c\u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c \u043f\u043e\u0434 \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0438\u0437 Zeppelin!\u00bb <\/p>\n<p>  \u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 Writer \u0435\u0441\u0442\u044c \u043b\u043e\u0433 \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/b98\/d81\/15a\/b98d8115a8526bcd1f3844d0f12f653f.png\"\/><\/p>\n<pre><code class=\"haskell\">data Writer w a = Writer { runWriter :: (a, w) } <\/code><\/pre>\n<p>  Writer \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u043a\u043e\u0434 \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435  <\/p>\n<pre><code class=\"haskell\">half 8 &gt;&gt;= half <\/code><\/pre>\n<p>  \u041d\u0443, \u0438\u043b\u0438 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>&lt;=&lt;<\/code> \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0443\u0442\u044c \u043a\u043e\u043c\u043f\u043e\u0437\u0438\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u043c\u043e\u043d\u0430\u0434, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c:  <\/p>\n<pre><code class=\"haskell\">half &lt;=&lt; half $ 8 <\/code><\/pre>\n<p>  \u0447\u0442\u043e \u0447\u0435\u0440\u0442\u043e\u0432\u0441\u043a\u0438 \u0431\u043b\u0438\u0437\u043a\u043e \u043a <code>half . half $ 8<\/code>. \u041a\u0440\u0443\u0442\u043e!<\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>tell<\/code>, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432 \u043b\u043e\u0433. \u0410 <code>return <\/code>\u043f\u0435\u0440\u0435\u0434\u0430\u0441\u0442 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 Writer. \u0412\u043e\u0442 \u043d\u0430\u0448\u0430 \u043e\u0431\u043d\u043e\u0432\u043b\u0451\u043d\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>half<\/code>:  <\/p>\n<pre><code class=\"haskell\">half :: Int -&gt; Writer String Int half x = do         tell (&quot;I just halved &quot; ++ (show x) ++ &quot;!&quot;)         return (x `div` 2) <\/code><\/pre>\n<p>  \u041e\u043d\u0430 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>Writer<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/c8a\/8e0\/ed0\/c8a8e0ed0a51dc082e7d3d1ee174c696.png\"\/><\/p>\n<p>  \u0418 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>runWriter<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0438\u0437 \u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/af1\/c2a\/8a0\/af1c2a8a09344c40303c9b5d2ff4cd81.png\"\/><\/p>\n<pre><code class=\"haskell\">runWriter $ half 8 =&gt; (4, &quot;I just halved 8!&quot;) <\/code><\/pre>\n<p>  \u041d\u043e \u0441\u0430\u043c\u044b\u0439 \u043a\u043b\u0451\u0432\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u0432\u044f\u0437\u0430\u0442\u044c \u0432\u044b\u0437\u043e\u0432\u044b <code>half <\/code>\u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0443, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <code>&gt;&gt;=<\/code>:  <\/p>\n<pre><code class=\"haskell\">runWriter $ half 8 &gt;&gt;= half =&gt; (2, &quot;I just halved 8!I just halved 4!&quot;) <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/9e7\/9bc\/372\/9e79bc3728309efd8350fc3095f1e8a0.png\"\/><\/p>\n<p>  \u041c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c <code>&gt;&gt;=<\/code> \u0437\u043d\u0430\u0435\u0442, \u043a\u0430\u043a \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0434\u0432\u0430 Writer&#8217;\u0430, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u0442 \u043d\u0443\u0436\u0434\u044b \u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e \u043a\u0430\u043a\u043e\u0439 \u0431\u044b \u0442\u043e \u043d\u0438 \u0431\u044b\u043b\u043e \u043d\u0443\u0434\u043d\u044b\u0439 \u043a\u043e\u0434! \u0412\u043e\u0442 \u043f\u043e\u043b\u043d\u043e\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>&gt;&gt;=<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/323\/c0f\/ae6\/323c0fae648b3f70a4582a5bd091a5d6.png\"\/><\/p>\n<p>  \u0422\u043e\u0447\u043d\u043e \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u044b \u0440\u0430\u043d\u0435\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u0430\u043c\u0438, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u044d\u0442\u0443 \u043e\u0431\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u0432\u0437\u044f\u043b\u0430 \u043d\u0430 \u0441\u0435\u0431\u044f <code>&gt;&gt;=<\/code>. \u041a\u043b\u0451\u0432\u043e! \u041c\u044b \u0442\u0430\u043a \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e <code>return<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0435\u0433\u043e \u0432 \u043c\u043e\u043d\u0430\u0434\u0443:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/492\/f80\/340\/492f80340d2467c8b885b43812a3bd7d.png\"\/><\/p>\n<pre><code class=\"haskell\">return val = Writer (val, &quot;&quot;) <\/code><\/pre>\n<p>  (<b>\u0417\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b>: \u044d\u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <i>\u043f\u043e\u0447\u0442\u0438 <\/i>\u0432\u0435\u0440\u043d\u043e\u0435. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u043e\u043d\u0430\u0434\u0430 <code>Writer <\/code>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 <code>Monoid <\/code>\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043b\u043e\u0433\u0430, \u0430 \u043d\u0435 \u043e\u0434\u043d\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u043e\u043a\u0438. \u042f \u0442\u0443\u0442 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043b \u0441\u043b\u0435\u0433\u043a\u0430.)<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0442\u0435\u0431\u0435, \u043c\u043e\u043d\u0430\u0434\u0430 Writer!<\/p>\n<h4>\u041c\u043e\u043d\u0430\u0434\u0430 Reader<\/h4>\n<p>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0432 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0439. \u041f\u0440\u043e\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043c\u043e\u043d\u0430\u0434\u0443 Reader:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/1cb\/2f6\/22f\/1cb2f622f33160a16fa139e29b131e0d.png\"\/><\/p>\n<p>  \u041e\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432\u0430\u0448\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0441\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c, \u0441\u043a\u0440\u044b\u0432 \u0441\u0430\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0437\u0430 \u043a\u0443\u043b\u0438\u0441\u0430\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"haskell\">greeter :: Reader String String greeter = do     name &lt;- ask     return (&quot;hello, &quot; ++ name ++ &quot;!&quot;) <\/code><\/pre>\n<p>  <code>greeter <\/code>\u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043c\u043e\u043d\u0430\u0434\u0443 Reader:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/d17\/adb\/a48\/d17adba48af58a7228300515b4faf8e8.png\"\/><\/p>\n<p>  \u0412\u043e\u0442 \u0435\u0451 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"haskell\">data Reader r a = Reader {  runReader :: r -&gt; a } <\/code><\/pre>\n<p>  Reader \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u043f\u0435\u0440\u0435\u0431\u0435\u0436\u0447\u0438\u043a\u043e\u043c. \u0422\u0451\u043c\u043d\u043e\u0439 \u043b\u043e\u0448\u0430\u0434\u043a\u043e\u0439. Reader \u0434\u0440\u0443\u0433\u043e\u0439, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043e\u043d \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u0447\u0442\u043e \u0441\u043c\u0443\u0449\u0430\u0435\u0442 \u043f\u0440\u0438 \u0435\u0433\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u0438\u0438. \u041d\u043e \u043c\u044b \u0441 \u0432\u0430\u043c\u0438 \u043f\u043e\u043d\u0438\u043c\u0430\u0435\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>runReader<\/code>, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/5b8\/860\/790\/5b8860790e50b21119db1d44c70bbfeb.png\"\/><\/p>\n<p>  \u0418 \u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0435\u043a\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u043e\u0442\u043e\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 <code>greeter<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/cc4\/137\/fb8\/cc4137fb86883996f0c2097871423713.png\"\/><\/p>\n<pre><code class=\"haskell\">runReader greeter $ &quot;adit&quot; =&gt; &quot;hello, adit!&quot;  <\/code><\/pre>\n<p>  \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 <code>&gt;&gt;=<\/code>, \u043d\u0430\u0437\u0430\u0434 \u0432\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c Reader. \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u0442\u0435 \u0432 \u043d\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u0442\u043e \u043e\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0432\u0441\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c\u0441\u044f \u0432 \u044d\u0442\u043e\u0439 \u043c\u043e\u043d\u0430\u0434\u0435.<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/a69\/bc3\/cc3\/a69bc3cc388b8eff61e694c499f18489.png\"\/><\/p>\n<pre><code class=\"haskell\">m &gt;&gt;= k  = Reader $ \\r -&gt; runReader (k (runReader m r)) r <\/code><\/pre>\n<p>  Reader \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u044b\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043d\u044b\u043c. \u042d\u0442\u043e \u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0433\u043e \u043b\u0443\u0447\u0448\u0435\u0435 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e.<br \/>  <code>return<\/code> \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 <code>Reader<\/code>: <br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/823\/bba\/491\/823bba491a78328a17db34481e9d9794.png\"\/><\/p>\n<pre><code class=\"haskell\">return a = Reader $ \\_ -&gt; a <\/code><\/pre>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, <code>ask<\/code> \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0432\u0430\u043c \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u043b\u0438:  <\/p>\n<pre><code class=\"haskell\">ask = Reader $ \\x -&gt; x  <\/code><\/pre>\n<p>  \u0425\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0432\u0435\u0441\u0442\u0438 \u0441 Reader&#8217;\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438? \u0412\u0440\u0443\u0431\u0438\u0442\u0435 \u043f\u0430\u043d\u043a-\u0440\u043e\u043a \u0438 \u0432\u0437\u0433\u043b\u044f\u043d\u0438\u0442\u0435 \u043d\u0430 <a href=\"https:\/\/gist.github.com\/egonSchiele\/5752172\">\u0431\u043e\u043b\u0435\u0435 \u0434\u043b\u0438\u043d\u043d\u044b\u0439 \u043f\u0440\u0438\u043c\u0435\u0440<\/a>.<\/p>\n<h4>\u041c\u043e\u043d\u0430\u0434\u0430 State<\/h4>\n<p>  \u041c\u043e\u043d\u0430\u0434\u0430 State \u2014 \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0432\u043f\u0435\u0447\u0430\u0442\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043b\u0443\u0447\u0448\u0438\u0439 \u0434\u0440\u0443\u0433 \u043c\u043e\u043d\u0430\u0434\u044b Reader:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/4b6\/ae3\/604\/4b6ae36049f62125b42ea465af0c846f.png\"\/><\/p>\n<p>  \u041e\u043d\u0430 \u0432 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u0436\u0435 \u0441\u0430\u043c\u043e\u0435, \u0447\u0442\u043e \u0438 \u043c\u043e\u043d\u0430\u0434\u0430 Reader, \u043d\u043e \u0441 \u0435\u0451 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0438\u0442\u0430\u0442\u044c, \u043d\u043e \u0438 \u043f\u0438\u0441\u0430\u0442\u044c!<br \/>  \u0412\u043e\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>State<\/code>:  <\/p>\n<pre><code class=\"haskell\">State s a = State { runState :: s -&gt; (a, s) }  <\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/5ba\/e9c\/89b\/5bae9c89b2f3b838fd751de24ad82243.png\"\/><\/p>\n<p>  \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>get<\/code> \u0438\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>put<\/code>. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440:  <\/p>\n<pre><code class=\"haskell\">greeter :: State String String greeter = do     name &lt;- get     put &quot;tintin&quot;     return (&quot;hello, &quot; ++ name ++ &quot;!&quot;)   runState greeter $ &quot;adit&quot; =&gt; (&quot;hello, adit!&quot;, &quot;tintin&quot;) <\/code><\/pre>\n<p>  \u041c\u0438\u043b\u043e! \u0415\u0441\u043b\u0438 Reader \u0431\u044b\u043b \u0441 \u0445\u0430\u0440\u0430\u043a\u0442\u0435\u0440\u043e\u043c\u00ab\u0442\u0435\u0431\u0435-\u043c\u0435\u043d\u044f-\u043d\u0435-\u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c\u00bb, \u0442\u043e State \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0441\u044f \u043a \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f\u043c \u0438 \u0441\u0430\u043c\u0430 \u0433\u043e\u0442\u043e\u0432\u0430 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f.<br \/>  \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 <code>State <\/code>\u043c\u043e\u043d\u0430\u0434\u044b \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u043d\u0430\u0434\u044b <code>Reader<\/code>:<br \/>  <code>return<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/2a4\/b96\/411\/2a4b96411d683dc17a584daaa82209d3.png\"\/><\/p>\n<pre><code class=\"haskell\">return a = State $ \\s -&gt; (a, s) <\/code><\/pre>\n<p>  <code>&gt;&gt;=<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/051\/afb\/1ec\/051afb1ecd485340650293d6f82f1b4b.png\"\/><\/p>\n<pre><code class=\"haskell\">m &gt;&gt;= k = State $ \\s -&gt; let (a, s') = runState m s                          in runState (k a) s' <\/code><\/pre>\n<h4>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h4>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/458\/bfb\/779\/458bfb779ad856baea09e0691be0c57a.png\"\/><\/p>\n<p>  Writer. Reader. State. \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0442\u0440\u0438 \u043c\u043e\u0449\u043d\u044b\u0445 \u043e\u0440\u0443\u0436\u0438\u044f \u0432 \u0441\u0432\u043e\u0439 Haskell-\u0430\u0440\u0441\u0435\u043d\u0430\u043b. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u0445 \u0441 \u0443\u043c\u043e\u043c.<\/p>\n<p>  <i>\u041e\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u0430: \u044f \u0431\u0443\u0434\u0443 \u0431\u0435\u0441\u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u0442\u0435\u043b\u044c\u043d\u0430 \u0437\u0430 \u043b\u044e\u0431\u044b\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u0432 \u043b\u0438\u0447\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043c\u043e\u0433\u0443\u0442 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430.<\/i>   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/184722\/\"> http:\/\/habrahabr.ru\/post\/184722\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       \u0412\u043d\u0438\u043c\u0430\u043d\u0438\u0435: \u043f\u0435\u0440\u0435\u0434 \u0442\u0435\u043c \u043a\u0430\u043a \u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0438\u0436\u0435, \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u043d\u0430\u0434\u044b. \u0415\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a, \u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0439\u0442\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/183150\/\">\u0432\u043e\u0442 \u044d\u0442\u043e\u0442 \u043f\u043e\u0441\u0442<\/a>!<\/p>\n<p>  \u041f\u0435\u0440\u0435\u0434 \u043d\u0430\u043c\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>half<\/code>:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/cae\/b90\/f70\/caeb90f70d874d167b9c41b79f6d9936.png\"\/><\/p>\n<p>  \u0418 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0435\u0451 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437:  <\/p>\n<pre><code class=\"haskell\">half . half $ 8 =&gt; 2 <\/code><\/pre>\n<p>  \u0412\u0441\u0451 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u0430\u043a \u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c. \u041d\u043e \u0432\u043e\u0442 \u0432\u044b \u0440\u0435\u0448\u0438\u043b\u0438, \u0447\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0431\u044b \u0438\u043c\u0435\u0442\u044c \u043b\u043e\u0433 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u044d\u0442\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/589\/c29\/38b\/589c2938bad51c85d798b6b6a9109331.png\"\/><\/p>\n<pre><code class=\"haskell\">half x = (x `div` 2, &quot;\u042f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0432\u0438\u043d\u0438\u043b  &quot; ++ (show x) ++ &quot;!&quot;) <\/code><\/pre>\n<p>  \u0427\u0442\u043e \u0436, \u043e\u0442\u043b\u0438\u0447\u043d\u043e. \u041d\u043e \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0441\u043b\u0438 \u0432\u044b \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c <code>half <\/code>\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437?  <\/p>\n<pre><code class=\"haskell\">half . half $ 8 <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u043e, \u0447\u0442\u043e \u043c\u044b <i>\u0445\u043e\u0442\u0435\u043b\u0438 \u0431\u044b<\/i>, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u043b\u043e:<br \/>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/79d\/276\/7a6\/79d2767a62262147d45b5cd660041b34.png\"\/><\/p>\n<p>  <b>\u0421\u043f\u043e\u0439\u043b\u0435\u0440<\/b>: \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0442\u0430\u043a \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442\u0441\u044f. \u041f\u0440\u0438\u0434\u0451\u0442\u0441\u044f \u0432\u0441\u0451 \u0440\u0430\u0441\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c \u0440\u0443\u0447\u043a\u0430\u043c\u0438:  <\/p>\n<pre><code class=\"haskell\">finalValue = (val2, log1 ++ log2)     where (val1, log1) = half 8           (val2, log2) = half val1 <\/code><\/pre>\n<p>  \u0424\u0443! \u042d\u0442\u043e \u043d\u0438 \u043a\u0430\u043f\u043b\u0438 \u043d\u0435 \u043f\u043e\u0445\u043e\u0436\u0435 \u043d\u0430 \u043b\u0430\u043a\u043e\u043d\u0438\u0447\u043d\u043e\u0435  <\/p>\n<pre><code class=\"haskell\">half . half $ 8 <\/code><\/pre>\n<p>  \u0410 \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0438\u043c\u0435\u044e\u0449\u0438\u0435 \u043b\u043e\u0433? \u041d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u0430\u043a\u0430\u044f \u0441\u0445\u0435\u043c\u0430: \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0449\u0435\u0439 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043b\u043e\u0433, \u043c\u044b \u0431\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0442\u044c \u044d\u0442\u0438 \u043b\u043e\u0433\u0438. \u042d\u0442\u043e \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u0430 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0441\u0438\u043b\u0451\u043d \u0432 \u043f\u043e\u0431\u043e\u0447\u043d\u044b\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u0430\u0445 \u0442\u0430\u043a, \u043a\u0430\u043a \u043c\u043e\u043d\u0430\u0434\u044b!  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-184722","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/184722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=184722"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/184722\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=184722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=184722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=184722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}