[Haskell-cafe] Recursion in Haskell

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Feb 18 21:54:45 EST 2007


On Feb 18, 2007, at 21:44 , Michael Vanier wrote:

> I think what you're asking here is why you need the parens around  
> (x:y) in the second case.  Function application doesn't use  
> parentheses

Function application never applies to pattern matching.

> The usual answer to this is "category theory" which is an extremely  
> abstract branch of mathematics.  But you

Actually, no; my understanding is that category theory as applied to  
Haskell is a retcon introduced when the notion of monads was imported  
from category theory, and the original theoretical foundation of  
Haskell came from a different branch of mathematics.

Lambda calculus is pretty fundamental to Haskell or any functional  
programming language, as is type theory (although that you really  
don't have to understand in detail unless you're hacking the type  
system; most of us leave that to Oleg :) and the Curry-Howard  
isomorphism (simply stated:  computer programs can be converted into  
mathematical proofs, and vice versa; this is most clearly  
demonstrated when the programs are described in terms of the lambda  
calculus, which is where the original formulation of Curry-Howard  
came from).

-- 
brandon s. allbery    [linux,solaris,freebsd,perl]     allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH





More information about the Haskell-Cafe mailing list