int [] x = { 1,0,0,1,0 }; Console.WriteLine (x.Aggregate (0, (a, b) => 2*a + b));
http://code.msdn.microsoft.com/LINQ-Aggregate-Operators-c51b3869
foldl ( \ a b -> 2*a + b) 0 [1,0,0,1,0]Haskell (http://haskell.org/)
historische Schreibweise: λab.2a + b
(Alonzo Church: The Calculi of Lambda Conversion, 1941)
vgl. Henk Barendregt: The Impact of the Lambda Calculus, 1997, ftp://ftp.cs.ru.nl/pub/CompMath.Found/church.ps