<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Macros on BradCypert.com</title>
    <link>https://www.bradcypert.com/tags/macros/</link>
    <description>Recent content in Macros on BradCypert.com</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Tue, 27 Dec 2022 22:25:45 -0500</lastBuildDate>
    <atom:link href="https://www.bradcypert.com/tags/macros/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Threading Pipelines in Clojure</title>
      <link>https://www.bradcypert.com/threading-pipelines-in-clojure/</link>
      <pubDate>Sat, 24 Dec 2016 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/threading-pipelines-in-clojure/</guid>
      <description>&lt;p&gt;Today we’re going to talk about the &lt;code&gt;thread&lt;/code&gt; macro (&lt;code&gt;-&amp;gt;&lt;/code&gt;) and how to manipulate functions to fit them into your “thread pipeline”. First, let’s figure out what exactly the thread macro is.&lt;/p&gt;&#xA;&lt;h4 id=&#34;the-thread-macro&#34;&gt;The Thread Macro&lt;/h4&gt;&#xA;&lt;p&gt;If you’ve used &lt;code&gt;-&amp;gt;&lt;/code&gt; before, you’ve done some threading. Other languages refer to this as “piping”, although this can be often confused with piping from the command-line. Check out this code (that doesn’t use the threading macro).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Understanding Clojure Macros</title>
      <link>https://www.bradcypert.com/understanding-clojure-macros/</link>
      <pubDate>Tue, 14 Jun 2016 00:00:00 +0000</pubDate>
      <guid>https://www.bradcypert.com/understanding-clojure-macros/</guid>
      <description>&lt;p&gt;Learning Clojure has been one of the most thought-provoking experiences of my life. Coming from a predominantly OOP background, it’s safe to say that it’s always been a bit of a challenge. Macro’s specifically, were a challenge that was hard for me to grasp, and I know cause a lot of pain points to new Clojuristas. To first understand a Macro, we must understand what a function does.&lt;/p&gt;&#xA;&lt;h4 id=&#34;what-is-a-function&#34;&gt;What is a function?&lt;/h4&gt;&#xA;&lt;p&gt;For the sake of this example – A function is a named procedure that tells a computer to do something (realistically, it’s a mapping between values that undergo a set sequence of instructions that transforms input into output, but that’s overkill for this example). A real life example is “taking out the trash.” When someone tells you to take out the trash, you know what steps you must take to make this happen. They can also provided more information (called arguments) to help you make a decision on which trash to take out – “Take out the &lt;strong&gt;bathroom&lt;/strong&gt; trash.” Functions give us an easy way to refer to repeatable tasks, and computers treat them the same way.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
