Skip to content

Commit

Permalink
Prepare article for publication
Browse files Browse the repository at this point in the history
  • Loading branch information
ploeh committed Jan 13, 2025
1 parent 8c0ff9b commit 18966a2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "Recawr Sandwich"
description: "A pattern variation."
date: 2024-10-29 13:58 UTC
date: 2025-01-13 15:52 UTC
tags: [Functional Programming, Design Patterns]
image: "/content/binary/impureim-superset-of-recawr.png"
image_alt: "A subset labeled 'Recawr Sandwiches' contained in a superset labeled 'Impureim Sandwiches'."
Expand All @@ -14,7 +14,7 @@
<em>{{ page.description }}</em>
</p>
<p>
After writing the articles <a href="">Collecting and handling result values</a> and <a href="">Short-circuiting an asynchronous traversal</a>, I realized that it might be valuable to describe a more disciplined variation of the <a href="/2020/03/02/impureim-sandwich">Impureim Sandwich</a> pattern.
After writing the articles <a href="/2024/11/18/collecting-and-handling-result-values">Collecting and handling result values</a> and <a href="/2024/12/02/short-circuiting-an-asynchronous-traversal">Short-circuiting an asynchronous traversal</a>, I realized that it might be valuable to describe a more disciplined variation of the <a href="/2020/03/02/impureim-sandwich">Impureim Sandwich</a> pattern.
</p>
<p>
The book <a href="/ref/dp">Design Patterns</a> describes each pattern over a number of sections. There's a description of the overall motivation, the structure of the pattern, UML diagrams, examples code, and more. One section discusses various implementation variations. I find it worthwhile, too, to explicitly draw attention to a particular variation of the more overall Impureim Sandwich pattern.
Expand Down Expand Up @@ -55,7 +55,7 @@ <h3 id="954558da563244edbb98a6685b3f9460">
Precipitating example <a href="#954558da563244edbb98a6685b3f9460">#</a>
</h3>
<p>
To be clear, I've been applying the Recawr Sandwich pattern for years, but it sometimes takes a counter-example before you realize that some implicit, tacit knowledge should be made explicit. This happened to me as I was discussing <a href="">this implementation</a> of Impureim Sandwich:
To be clear, I've been applying the Recawr Sandwich pattern for years, but it sometimes takes a counter-example before you realize that some implicit, tacit knowledge should be made explicit. This happened to me as I was discussing <a href="/2024/11/18/collecting-and-handling-result-values">this implementation</a> of Impureim Sandwich:
</p>
<p>
<pre><span style="color:green;">//&nbsp;Impure</span>
Expand Down Expand Up @@ -121,7 +121,7 @@ <h3 id="ef69b33222b44b3e889fc0c861537d48">
<li><a href="/2019/09/09/picture-archivist-in-haskell">Picture archivist in Haskell</a></li>
<li><a href="/2019/09/16/picture-archivist-in-f">Picture archivist in F#</a></li>
<li><a href="/2021/09/06/the-command-handler-contravariant-functor">The Command Handler contravariant functor</a></li>
<li><a href="">A restaurant sandwich</a></li>
<li><a href="/2024/12/16/a-restaurant-sandwich">A restaurant sandwich</a></li>
</ul>
<p>
In other words, I'm just retroactively giving these examples a more specific label.
Expand Down

0 comments on commit 18966a2

Please sign in to comment.