Add an intermezzo about the id function.
[matthijs/master-project/report.git] / Chapters / Prototype.tex
index bad0d0647646f97ac552c97b4b6feb0d68d90ba9..b391d4fcbc6951c2c86af451b805cec8187aae28 100644 (file)
       families and other non-standard Haskell stuff which we do not (plan to)
       support.
 
+      \placeintermezzo{}{
+        \startframedtext[width=8cm,background=box,frame=no]
+        \startalignment[center]
+          {\tfa The \hs{id} function}
+        \stopalignment
+        \blank[medium]
+          A function that is probably present in every functional language, is
+          the \emph{identity} function. This is the function that takes a
+          single argument and simply returns it unmodified. In Haskell this
+          function is called \hs{id} and can take an argument of any type
+          (\ie, it is polymorphic).
+
+          The \hs{id} function will be used in the examples every now and
+          then.
+        \stopframedtext
+      }
       In Core, every expression is typed. The translation to Core happens
       after the typechecker, so types in Core are always correct as well
       (though you could of course construct invalidly typed expressions