Ω =(λa.a a) λa.a a

Y = λf.(λa.f (a a)) λa.f (a a)

join x = x >>= id
fmap f m = liftM f m = m >>= return.f
a >>= f = join (fmap f a)
f >=> g = x -> f x >>= g

ap mf mx = mf >>= f -> mx >>= x -> return (f x)
ghc -c -ddump-simpl -dsuppress-coercions -dsuppress-uniques
[e|ε] = [e]
[e|b]         = if b then [e] else []
[e|x<-xs]     = map (λx.e) xs
[e|q,q']      = concat [ [e|q'] | q ]
m >>= ( λx. f x >>= ( λy. return (x + y) ) )
λk. m ( λx'. ( λx. f x >>= ( λy. return (x + y) ) ) x' k )

λk. m ( λx'. (  f x' >>= ( λy. return (x' + y) ) ) k )
λk. m ( λx'. (λk'.  f x' (λy'. ( λy. return (x' + y) ) y' k ' )) k )

λk. m ( λx'. ( f x' (λy'. ( λy. return (x' + y) ) y' k  )) )
λk. m ( λx'. ( f x' (λy'. (return (x' + y')) k  )) )

λk. m ( λx'. ( f x' (λy'. (λk''. k'' (x' + y')) k  )) )
λk. m ( λx'. ( f x' (λy'. k (x' + y')  )) )
λk. m ( λx'. f x' (λy'. k (x' + y') ) )
pat 	:= 	lpat qconop pat 	         (infix constructor)
	| 	lpat

lpat 	:= 	apat
	| 	- (integer | float) 	         (negative literal)
	| 	gcon (apat)k 	                 (arity gcon  =  k, k ≥ 1)

apat 	:=	var
	| 	gcon 	                         (arity gcon  =  0)
	| 	literal
	| 	_ 	                         (wildcard)
	| 	( pat ) 	                 (parenthesized pattern)
	| 	( pat1 , … , patk )              (tuple pattern, k ≥ 2)
	| 	[ pat1 , … , patk ] 	         (list pattern, k ≥ 1)
exp    →        lexp qop exp                     (infix operator application)
	|       - exp                            (prefix negation)
	|       lexp

lexp 	→ 	\ apat1 … apatn -> exp 	         (lambda abstraction, n ≥ 1)
	| 	let decls in exp 	         (let expression)
	| 	if exp then exp else exp         (conditional)
	| 	case exp of alts 	         (case expression)
	| 	(aexp)+ 	                 (function application)

aexp 	→ 	qvar 	                         (variable)
	| 	gcon 	                         (general constructor)
	| 	literal
	| 	( exp ) 	                 (parenthesized expression)
	| 	( exp1 , … , expk ) 	         (tuple, k ≥ 2)
	| 	[ exp1 , … , expk ] 	         (list, k ≥ 1)
	| 	( exp qop ) 	                 (left section)
        |( qop⟨-⟩ exp )                           (right section)
decls 	→ 	{ decl1 ; … ; decln } 	    (n ≥ 0)
alts 	→ 	{ alt1  ; … ; altn  } 	    (n ≥ 1)

decl 	→ 	bindingdecl
	| 	functiondecl

alt          →  pat    (| guards)? -> exp  (where decls)?
bindingdecl  → 	pat    (| guards)? =  exp  (where decls)?
functiondecl → 	funlhs (| guards)? =  exp  (where decls)?

funlhs 	→ 	var apat+
	| 	pat varop pat
	| 	( funlhs ) apat+ 

guards 	→ 	guard (, guard )*
guard 	→ 	let decls 	                     (local declaration)
	| 	exp 	                             (boolean guard) 	
(first|last|nth-first|nth-last|only)-(child|child-of-type)
(first|last|nth-first|nth-last|only)-(child|child-of-type)
(first|last|nth|nth-last|only)-(child|of-type)

first-child
last-child
nth-child
nth-last-child
only-child

first-of-type
last-of-type
nth-of-type
nth-of-type
only-of-type
http://www.compileonline.com/compile_haskell_online.php Declaraciones newtype en Haskell
La Transformaci�n de Haskell Curry y la Aplicaci�n Parcial
JavaScript::�Podr�as hacerlo sin if?
Polimorfismo Parametrico de Rango Superior en Haskell