Skip to content

Instantly share code, notes, and snippets.

@trescenzi
Created February 27, 2013 20:54
Show Gist options
  • Save trescenzi/5051628 to your computer and use it in GitHub Desktop.
Save trescenzi/5051628 to your computer and use it in GitHub Desktop.
<section class="slide" id="declarative">
<h2>Declarative</h2>
<blockquote>A programming paradigm that expresses the logic of a computation without describing its control flow</blockquote>
<section class="slide"><center><h3>Lets make a list of numbers 1-5</h3></center></section>
<section class="slide">
<h3>Declarative</h3>
<pre class="prettyprint"><code>
let x = take 5 [1..]
</code></pre>
<h3>Imperative</h3>
<pre class="prettyprint"><code>
int x = new int[5];
for(int i=1; i<=5; i++)
x[i] = i
</code></pre>
</section>
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment