<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Eduardo Borges</title>
    <description>personal thoughts about programming and life</description>
    <link>/</link>
    <atom:link href="/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sun, 10 Jul 2016 18:47:12 -0400</pubDate>
    <lastBuildDate>Sun, 10 Jul 2016 18:47:12 -0400</lastBuildDate>
    <generator>Jekyll v3.1.6</generator>
    
      <item>
        <title>Specter</title>
        <description>&lt;p&gt;
&lt;a href=&quot;https://github.com/nathanmarz/specter&quot;&gt;Specter&lt;/a&gt; é uma biblioteca que trás uma maneira diferente de trabalhar com
estruturas de dados aninhadas em Clojure. Ela faz uso dos chamados &lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt; para
fazer fazer transformações e consultas.
&lt;/p&gt;

&lt;p&gt;
Essa proposta é muito interessante para deixar a tentação de recorrer à
mutabilidate por ser mais fácil de se alterar um subset da estrutura, porque como
Rich Hickey já nos ensinou, &lt;a href=&quot;https://www.infoq.com/presentations/Simple-Made-Easy&quot;&gt;fácil não quer dizer simples&lt;/a&gt;.
&lt;/p&gt;

&lt;p&gt;
A principal vantagem dos &lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt; é que eles podem ser combinados com outros para
expressar regras mais complexas mantendo a função de transformação intácta.
&lt;/p&gt;

&lt;p&gt;
Considere que temos uma lista de maps que representam pessoas, e nesses maps,
temos as keys &lt;code&gt;:name&lt;/code&gt; identificando os nomes e &lt;code&gt;:age&lt;/code&gt; as idades. Diante deste
cenário, queremos incrementar as idades de todo mundo em um.
&lt;/p&gt;

&lt;p&gt;
Para atingir este objetivo, usariamos a função core do clojure &lt;code&gt;update&lt;/code&gt; em
conjunto com &lt;code&gt;map&lt;/code&gt; para executar essa transformação.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-clojure&quot;&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;(&lt;/span&gt;map #&lt;span style=&quot;color: #bc6ec5;&quot;&gt;(&lt;/span&gt;update &lt;span style=&quot;color: #7590db;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; inc&lt;span style=&quot;color: #bc6ec5;&quot;&gt;)&lt;/span&gt;
     &lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Carlos&quot;&lt;/span&gt;
       &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;31&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
      &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Julia&quot;&lt;/span&gt;
       &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;25&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
      &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Katia&quot;&lt;/span&gt;
       &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;69&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;=&amp;gt; ({&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Carlos&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 32} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Julia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 26} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Katia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 70})&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Em comparação, com Specter:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-clojure&quot;&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;(&lt;/span&gt;require &#39;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #ce537a; font-weight: bold;&quot;&gt;com.rpl.specter&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;:refer&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;[&lt;/span&gt;transform &lt;span style=&quot;color: #a45bad;&quot;&gt;ALL&lt;/span&gt; comp-paths&lt;span style=&quot;color: #2d9574;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;)&lt;/span&gt;

&lt;span style=&quot;color: #4f97d7;&quot;&gt;(&lt;/span&gt;transform &lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;ALL&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;
           inc
           &lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Carlos&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;31&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Julia&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;25&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Katia&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;69&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;=&amp;gt; [{&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Carlos&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 32} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Julia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 26} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Katia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 70}]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
Primeiro começamos fazendo &lt;code&gt;require&lt;/code&gt; no namespace principal do Specter, com um
refer das vars &lt;code&gt;transform=e =ALL&lt;/code&gt; para o nosso namespace atual. A primeira var
importada é uma função &lt;code&gt;transform&lt;/code&gt; que recebe três argumentos, um vetor de
&lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt;, uma função para aplicar nos nós achados pelos &lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt; e por final, a
estrutura de dados a ser modificada.
&lt;/p&gt;

&lt;p&gt;
Vamos nos concentrar no primeiro argumento da função, o que &lt;code&gt;[ALL :age]&lt;/code&gt; quer
dizer?
&lt;/p&gt;

&lt;p&gt;
&lt;code&gt;ALL&lt;/code&gt; é um &lt;span class=&quot;underline&quot;&gt;path&lt;/span&gt; padrão do Specter, com ele queremos dizer que estamos
interessados em todos os itens de uma coleção, o próximo &lt;span class=&quot;underline&quot;&gt;path&lt;/span&gt; na lista é o
&lt;code&gt;:age&lt;/code&gt; que não é nada mais, nada menos que uma &lt;span class=&quot;underline&quot;&gt;keyword&lt;/span&gt;, que são tratadas como
funções quando usadas em maps, então se juntarmos esses dois elementos, estamos
dizendo ao Specter que queremos aplicar a função &lt;code&gt;inc&lt;/code&gt; em todos os valores de
&lt;code&gt;:age&lt;/code&gt; em cada elemento de uma coleção.
&lt;/p&gt;

&lt;p&gt;
Se analisarmos o exemplo acima, podemos não enxergar muita vantagem na última
abordagem, afinal de contas, usando Specter, nós escrevemos mais linhas de
código, sem falar na dependência extra. Mas quando separamos a transformação das
regras de estrutura, abrimos espaço para composição, tnato de &lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt; quanto de
funções.
&lt;/p&gt;

&lt;p&gt;
Vamos aplicar isso em mais um exemplo, imagine que nessa mesma estrutura que
estamos utilizando, nós precisemos incrementar a idade apenas das pessoas que
tenham mais de 60 anos. O resultado seria:
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-clojure&quot;&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;(&lt;/span&gt;transform &lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;ALL&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; #&lt;span style=&quot;color: #2d9574;&quot;&gt;(&lt;/span&gt;&amp;gt; &lt;span style=&quot;color: #7590db;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;60&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;
           inc
           &lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Carlos&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;31&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Julia&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;25&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Katia&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;69&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;=&amp;gt; [{&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Carlos&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 31} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Julia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 25} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Katia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 70}]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;
A função de transformação continua a mesma, a estrutura continua a mesma, mas
com apenas uma pequena função anônima no final do vetor de &lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt; nós mudamos
completamente o comportamento do nosso código, atingindo o resultado esperado
sem muitas mudanças.
&lt;/p&gt;

&lt;p&gt;
E o melhor de tudo, podemos compor esses &lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt; e dar nome as nossas abstrações.
&lt;/p&gt;

&lt;div class=&quot;org-src-container&quot;&gt;

&lt;pre class=&quot;src src-clojure&quot;&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #4f97d7; font-weight: bold;&quot;&gt;def&lt;/span&gt; &lt;span style=&quot;color: #7590db;&quot;&gt;WITH-AGES-GREATER-THAN-60&lt;/span&gt; &lt;span style=&quot;color: #bc6ec5;&quot;&gt;(&lt;/span&gt;comp-paths &lt;span style=&quot;color: #a45bad;&quot;&gt;ALL&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; #&lt;span style=&quot;color: #2d9574;&quot;&gt;(&lt;/span&gt;&amp;gt; &lt;span style=&quot;color: #7590db;&quot;&gt;%&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;60&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;)&lt;/span&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #4f97d7;&quot;&gt;(&lt;/span&gt;transform &lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;WITH-AGES-GREATER-THAN-60&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;
           inc
           &lt;span style=&quot;color: #bc6ec5;&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Carlos&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;31&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Julia&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;25&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;
            &lt;span style=&quot;color: #2d9574;&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #a45bad;&quot;&gt;:name&lt;/span&gt; &lt;span style=&quot;color: #2d9574;&quot;&gt;&quot;Katia&quot;&lt;/span&gt;
             &lt;span style=&quot;color: #a45bad;&quot;&gt;:age&lt;/span&gt; &lt;span style=&quot;color: #a45bad;&quot;&gt;69&lt;/span&gt;&lt;span style=&quot;color: #2d9574;&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #bc6ec5;&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #4f97d7;&quot;&gt;)&lt;/span&gt;
&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;;; &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;=&amp;gt; [{&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Carlos&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 31} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Julia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 25} {&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:name&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; &quot;Katia&quot;, &lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt;:age&lt;/span&gt;&lt;span style=&quot;color: #2aa1ae; background-color: #292e34;&quot;&gt; 70}]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div id=&quot;outline-container-orgheadline1&quot; class=&quot;outline-2&quot;&gt;
&lt;h2 id=&quot;orgheadline1&quot;&gt;Conclusão&lt;/h2&gt;
&lt;div class=&quot;outline-text-2&quot; id=&quot;text-orgheadline1&quot;&gt;
&lt;p&gt;
Specter é uma bibliotéca que te faz repensar o jeito de escrever código, as
ferramentas que são colocadas à mesa são muito poderosas e podem te livrar de
muita dor de cabeça. Obviamente, só toquei na ponta do iceberg com esse post. só
expondo a funcionalidade de transformação e não aprofundando muito em tudo que
pode ser feito com os &lt;span class=&quot;underline&quot;&gt;paths&lt;/span&gt;. Há também a possibilidade de se executar
consultas e setar valores em qualquer estrutura de dados.
&lt;/p&gt;

&lt;p&gt;
Dito isso, indico muito a experiência de tentar Specter, simplesmente brinque
com as possibilidades no repl e faça comparações com soluções usando apenas as
funções nativas do Clojure e veja por si mesmo.
&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
</description>
        <pubDate>Mon, 06 Jun 2016 16:36:30 -0400</pubDate>
        <link>/articles/16/specter</link>
        <guid isPermaLink="true">/articles/16/specter</guid>
        
        
        <category>clojure</category>
        
        <category>data</category>
        
        <category>structure</category>
        
        <category>library</category>
        
        <category>immutability</category>
        
      </item>
    
  </channel>
</rss>
