John Kodumal  committed ff7b1fe

Slightly expanded section on applicative syntax

  • Participants
  • Parent commits 149c7a2

Comments (0)

Files changed (1)

 		<li class="slide"><em>Functional design patterns</em></li>
 		<li class="slide">There's mostly* nothing magical about these typeclasses</li>
 		<li class="slide">In scala, they're provided by a library called scalaz (pronounced scala-zed)</li>
-		<li class="slide">We're using a snapshot of scalaz-seven, hosted on github</li>
+		<li class="slide">These examples are based on <a href="">scalaz-seven</a></li>
 		<li class="slide">This is how the hierarchy is defined in Haskell--- it isn't perfect</li>
 	<p class="slide">We'll cover functors, applicative functors, and monads</p>
 		<p style="font-size: 60%">(Yuck)</p>
-	<div class="slide">
+<section class="slide">
+	<h2>Applicative Syntax</h2>
+	<div>
 		<p>In Haskell, things look a little more obvious: </p>
 <pre class="haskell">
 (+) <$> parse("3") <*> parse("Nope") 
 	<div class="slide">
+		<p>Generalizing a bit, we go from calling a pure function: </p>
+<pre class="haskell">
+f x y z
+	</div>
+	<div class="slide">
+		<p>To calling a function on "effectful" arguments: </p>
+<pre class="haskell">
+f <$> x <*> y <*> z
+	</div>
+	<div class="slide">
 		<p>Scalaz's <code>ApplicativeBuilder</code> improves the situation somewhat:</p>
 <pre class="scala">
 (parse("3") |@| parse("Nope"))(_ + _)
-	</div>
+	</div>	
 <section class="slide">