<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.conservapedia.com/index.php?action=history&amp;feed=atom&amp;title=Curried_Function</id>
	<title>Curried Function - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.conservapedia.com/index.php?action=history&amp;feed=atom&amp;title=Curried_Function"/>
	<link rel="alternate" type="text/html" href="https://www.conservapedia.com/index.php?title=Curried_Function&amp;action=history"/>
	<updated>2026-11-11T17:10:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://www.conservapedia.com/index.php?title=Curried_Function&amp;diff=1262523&amp;oldid=prev</id>
		<title>DavidB4-bot: /* An Example of Why and How */Spelling/Grammar Check, typos fixed: For example → For example,, defintion → definition</title>
		<link rel="alternate" type="text/html" href="https://www.conservapedia.com/index.php?title=Curried_Function&amp;diff=1262523&amp;oldid=prev"/>
		<updated>2016-07-15T14:48:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;An Example of Why and How: &lt;/span&gt;Spelling/Grammar Check, typos fixed: For example → For example,, defintion → definition&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 14:48, July 15, 2016&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot; &gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Rather than giving multiply a tuple with two numbers, what if we only gave multiply one number. This function would then return another function, which took another number. This second function would then return the answer.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Rather than giving multiply a tuple with two numbers, what if we only gave multiply one number. This function would then return another function, which took another number. This second function would then return the answer.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example if we were multiplying 3 and 2, multiply would take 3, return a new function called ''multiply 3'' which takes 2 as its argument and returns 6.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;For example&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;, &lt;/ins&gt;if we were multiplying 3 and 2, multiply would take 3, return a new function called ''multiply 3'' which takes 2 as its argument and returns 6.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In Haskell syntax we would define this as&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In Haskell syntax we would define this as&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l21&quot; &gt;Line 21:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 21:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  multiply x y = x * y&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  multiply x y = x * y&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this new &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;defintion &lt;/del&gt;we can just set out function double to be multiply 2. In Haskell this is&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;With this new &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;definition &lt;/ins&gt;we can just set out function double to be multiply 2. In Haskell this is&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  double :: Integer -&amp;gt; Integer&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  double :: Integer -&amp;gt; Integer&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>DavidB4-bot</name></author>
	</entry>
	<entry>
		<id>https://www.conservapedia.com/index.php?title=Curried_Function&amp;diff=923566&amp;oldid=prev</id>
		<title>JamesWilson: /* An Example of Why and How */ cat</title>
		<link rel="alternate" type="text/html" href="https://www.conservapedia.com/index.php?title=Curried_Function&amp;diff=923566&amp;oldid=prev"/>
		<updated>2011-10-01T19:30:18Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;An Example of Why and How: &lt;/span&gt; cat&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:30, October 1, 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l33&quot; &gt;Line 33:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 33:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is called partial function application and is one of the greatest strengths of [[functional programming]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This is called partial function application and is one of the greatest strengths of [[functional programming]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Computer Science]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>JamesWilson</name></author>
	</entry>
	<entry>
		<id>https://www.conservapedia.com/index.php?title=Curried_Function&amp;diff=918298&amp;oldid=prev</id>
		<title>Pmgarvey: Created page with &quot;A '''Curried Function''' is a concept in Computer Science and programming related to how a function takes in an argument and gives out a value. It is named for the logici...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.conservapedia.com/index.php?title=Curried_Function&amp;diff=918298&amp;oldid=prev"/>
		<updated>2011-09-20T04:43:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;A &amp;#039;&amp;#039;&amp;#039;Curried Function&amp;#039;&amp;#039;&amp;#039; is a concept in &lt;a href=&quot;/Computer_Science&quot; class=&quot;mw-redirect&quot; title=&quot;Computer Science&quot;&gt;Computer Science&lt;/a&gt; and &lt;a href=&quot;/Programming&quot; class=&quot;mw-redirect&quot; title=&quot;Programming&quot;&gt;programming&lt;/a&gt; related to how a function takes in an argument and gives out a value. It is named for the logici...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A '''Curried Function''' is a concept in [[Computer Science]] and [[programming]] related to how a function takes in an argument and gives out a value. It is named for the logician Haskell Curry.&lt;br /&gt;
&lt;br /&gt;
==An Example of Why and How==&lt;br /&gt;
&lt;br /&gt;
Imagine we have a [[function]] that multiplies two numbers together, call it ''multiply''. Clearly it must take two numbers as an argument (we'll just stick with [[integers]] for simplicity).. However we're restricted by functional languages which only let us give one value as input to a function. The obvious answer is to package the two numbers together as a new value, called a [[tuple]]. This function would be written in Haskell as&lt;br /&gt;
&lt;br /&gt;
 multiply :: (Integer,Integer) -&amp;gt; Integer&lt;br /&gt;
 multiply (x,y) = x * y &lt;br /&gt;
&lt;br /&gt;
Now let's say we multiply things by two a lot in our program, so rather than writing this out repeatedly we'll define a new function, which we'll call ''double''. We want to use our old function as we've already defined it (obviously it's not too much effort with multiplication, but the principles apply to complicated functions as well).&lt;br /&gt;
&lt;br /&gt;
However we have a problem, there isn't a way of doing this. We don't have a tuple to give multiply. However, imagine if we defined multiply a new way.&lt;br /&gt;
&lt;br /&gt;
Rather than giving multiply a tuple with two numbers, what if we only gave multiply one number. This function would then return another function, which took another number. This second function would then return the answer.&lt;br /&gt;
&lt;br /&gt;
For example if we were multiplying 3 and 2, multiply would take 3, return a new function called ''multiply 3'' which takes 2 as its argument and returns 6.&lt;br /&gt;
&lt;br /&gt;
In Haskell syntax we would define this as&lt;br /&gt;
&lt;br /&gt;
 multiply :: Integer -&amp;gt; Integer -&amp;gt; Integer&lt;br /&gt;
 multiply x y = x * y&lt;br /&gt;
&lt;br /&gt;
With this new defintion we can just set out function double to be multiply 2. In Haskell this is&lt;br /&gt;
&lt;br /&gt;
 double :: Integer -&amp;gt; Integer&lt;br /&gt;
 double x = multiply 2 x&lt;br /&gt;
&lt;br /&gt;
or if preferred&lt;br /&gt;
&lt;br /&gt;
 double = multiply 2&lt;br /&gt;
&lt;br /&gt;
This latter style is called [[points free programming]].&lt;br /&gt;
&lt;br /&gt;
This is called partial function application and is one of the greatest strengths of [[functional programming]].&lt;/div&gt;</summary>
		<author><name>Pmgarvey</name></author>
	</entry>
</feed>