VTLUUG:2016-03-24: Difference between revisions

From the Linux and Unix Users Group at Virginia Teck Wiki
Jump to navigation Jump to search
imported>Echarlie
imported>Echarlie
Line 47: Line 47:
=== Beta reduction ===
=== Beta reduction ===
Meat of Lambda calculus.
Meat of Lambda calculus.
=== Currying ===
Allows for nested functions. Functions manipulate each input individually


===Examples===
===Examples===


<pre>
<pre>
                            Currying example:
                              Currying example:
  (ƛx.x)2                   (ƛabc.cba)zz(ƛwv.w)
  (ƛx.x)2   x is bound        (ƛabc.cba)zz(ƛwv.w)
(ƛ[x:=2x])         (ƛa.(ƛb.(ƛc.cba)))(z)z(ƛw.(ƛv.w)))  The first function
(ƛ[x:=2]) to 2          (ƛa.(ƛb.(ƛc.cba)))(z)z(ƛw.(ƛv.w)))  The first function
     2                   (ƛa.(ƛb.zba)z(ƛw.(ƛv.w)        Only applies the first z
     2                                 Only applies the first z
 
                                     


(ƛz.zz)(ƛy.yy)
(ƛz.zz)(ƛy.yy)
(ƛ[z:=(ƛ
(ƛ[z:=(ƛy.yy)].zz)
 




Currying example:
(ƛabc.cba)zz(ƛwv.w)
(ƛa.(ƛb.(ƛc.cba)))(z)z(ƛw.(ƛv.w)))  The first function only applies the first z
(ƛb.(ƛc.cbz))z(ƛw.(ƛv.w))            applies from the outer parenths in
(ƛc.czz)(ƛw.(ƛv.w))                  so c is applied last
(ƛw.(ƛv.w))zz
(ƛv.z)z
z
</pre>
</pre>
=== Currying ===





Revision as of 01:23, 25 March 2016

Our seventh meeting of the 2016 Spring semester, and Officer Elections

Date, Time, and Location

Announcements

Curriculum du jour

  • Officer Elections
    • This is a consequence of new club registration policies.

Results

  • President
    • Jacob Melton
  • VP of not IT
    • Marcus Wanners
  • Secretary/Treasurer
    • John Volk

Talks

  • ackthet is giving the talk: Lambda Calculus for Babies. Retarded Babies.
    • First in ackthet's 10-part talk on Xmonad, starting from the basics of haskell

Hacking

Lambda Calculus for Babies: Retarded Babies

Lambda Calculus forms the fundamentals of functional programming. If it can be described as a function, it can be described in the lambda calculus and consequently written in Haskell

Alpha equivalence

  • Variable name doesn't matter

Beta reduction

Meat of Lambda calculus.

Currying

Allows for nested functions. Functions manipulate each input individually

Examples

                               Currying example:
 (ƛx.x)2   x is bound         (ƛabc.cba)zz(ƛwv.w)
(ƛ[x:=2])  to 2           (ƛa.(ƛb.(ƛc.cba)))(z)z(ƛw.(ƛv.w)))  The first function
    2                                  Only applies the first z
                                       

(ƛz.zz)(ƛy.yy)
(ƛ[z:=(ƛy.yy)].zz)


Currying example:
(ƛabc.cba)zz(ƛwv.w)
(ƛa.(ƛb.(ƛc.cba)))(z)z(ƛw.(ƛv.w)))   The first function only applies the first z
(ƛb.(ƛc.cbz))z(ƛw.(ƛv.w))            applies from the outer parenths in
(ƛc.czz)(ƛw.(ƛv.w))                  so c is applied last
(ƛw.(ƛv.w))zz
(ƛv.z)z
 z