document.write("<div class=\"pastie\">\n");
document.write("  <link href=\"http://pastie.org/stylesheets/embed.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  <link href=\"http://pastie.org/stylesheets/clean.css\" media=\"screen\" rel=\"stylesheet\" type=\"text/css\" />\n");
document.write("  \n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\"><span class=\'comment comment_line comment_line_number-sign comment_line_number-sign_ruby\'># f(f\') {f(1)}, g(x1, x2, x3) {}, main{ f(g(2, 3)}<\/span>\n");
document.write("\n");
document.write("<span class=\'meta meta_function meta_function_method meta_function_method_with-arguments meta_function_method_with-arguments_ruby\'><span class=\'keyword keyword_control keyword_control_def keyword_control_def_ruby\'>def<\/span> <span class=\'entity entity_name entity_name_function entity_name_function_ruby\'>curry<\/span>(<span class=\'variable variable_parameter variable_parameter_function variable_parameter_function_ruby\'><span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby\'>*<\/span>params, <span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby\'>&amp;<\/span>block<\/span>)<\/span>\n");
document.write("  lambda {|*<span class=\'variable variable_other variable_other_block variable_other_block_ruby\'>curry_params<\/span>| block.call(<span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby\'>*<\/span>(params.dup.concat(curry_params)))}\n");
document.write("<span class=\'keyword keyword_control keyword_control_ruby\'>end<\/span>\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("<hr />\n");
document.write("<h2>usage: <\/h2>\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("\n");
document.write("	\n");
document.write("	<div class=\"allcode\">\n");
document.write("		<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n");
document.write("		<tr>\n");
document.write("			<td>\n");
document.write("				\n");
document.write("				<pre class=\"textmate-source-numbers\">1\n");
document.write("2\n");
document.write("3\n");
document.write("4\n");
document.write("5\n");
document.write("6\n");
document.write("7\n");
document.write("8\n");
document.write("9\n");
document.write("10\n");
document.write("11\n");
document.write("<\/pre>\n");
document.write("			<\/td>\n");
document.write("		<td>\n");
document.write("		<pre class=\"textmate-source\"><pre class=\"sunburst\">g <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> lambda {|<span class=\'variable variable_other variable_other_block variable_other_block_ruby\'>x1<\/span>, <span class=\'variable variable_other variable_other_block variable_other_block_ruby\'>x2<\/span>, <span class=\'variable variable_other variable_other_block variable_other_block_ruby\'>x3<\/span>| puts <span class=\'string string_quoted string_quoted_double string_quoted_double_ruby\'>&quot;x1: <span class=\'source source_ruby source_ruby_embedded source_ruby_embedded_source\'>#{x1}<\/span>, x2: <span class=\'source source_ruby source_ruby_embedded source_ruby_embedded_source\'>#{x2}<\/span>. x3 <span class=\'source source_ruby source_ruby_embedded source_ruby_embedded_source\'>#{x3}<\/span>&quot;<\/span>}\n");
document.write("f(<span class=\'constant constant_numeric constant_numeric_ruby\'>1<\/span>, <span class=\'constant constant_numeric constant_numeric_ruby\'>2<\/span>, <span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby\'>&amp;<\/span>g).call(<span class=\'constant constant_numeric constant_numeric_ruby\'>3<\/span>)\n");
document.write("<span class=\'comment comment_line comment_line_number-sign comment_line_number-sign_ruby\'>#=&gt; x1: 1, x2: 2. x3 3<\/span>\n");
document.write("f <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> curry(<span class=\'constant constant_numeric constant_numeric_ruby\'>1<\/span>,<span class=\'constant constant_numeric constant_numeric_ruby\'>2<\/span>) {|<span class=\'variable variable_other variable_other_block variable_other_block_ruby\'>x1<\/span>, <span class=\'variable variable_other variable_other_block variable_other_block_ruby\'>x2<\/span>, <span class=\'variable variable_other variable_other_block variable_other_block_ruby\'>x3<\/span>| puts <span class=\'string string_quoted string_quoted_double string_quoted_double_ruby\'>&quot;x1 <span class=\'source source_ruby source_ruby_embedded source_ruby_embedded_source\'>#{x1}<\/span> x2 <span class=\'source source_ruby source_ruby_embedded source_ruby_embedded_source\'>#{x2}<\/span> x3 <span class=\'source source_ruby source_ruby_embedded source_ruby_embedded_source\'>#{x3}<\/span>&quot;<\/span>}\n");
document.write("f.call(<span class=\'constant constant_numeric constant_numeric_ruby\'>3<\/span>)\n");
document.write("<span class=\'comment comment_line comment_line_number-sign comment_line_number-sign_ruby\'>#=&gt; x1 1 x2 2 x3 3<\/span>\n");
document.write("a <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> curry(<span class=\'constant constant_numeric constant_numeric_ruby\'>1<\/span>, <span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby\'>&amp;<\/span>g)\n");
document.write("b <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> curry(<span class=\'constant constant_numeric constant_numeric_ruby\'>2<\/span>, <span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby\'>&amp;<\/span>a)\n");
document.write("c <span class=\'keyword keyword_operator keyword_operator_assignment keyword_operator_assignment_ruby\'>=<\/span> curry(<span class=\'constant constant_numeric constant_numeric_ruby\'>3<\/span>, <span class=\'keyword keyword_operator keyword_operator_arithmetic keyword_operator_arithmetic_ruby\'>&amp;<\/span>b)\n");
document.write("c.call\n");
document.write("<span class=\'comment comment_line comment_line_number-sign comment_line_number-sign_ruby\'>#=&gt; x1 1 x2 2 x3 3<\/span>\n");
document.write("<\/pre><\/pre>\n");
document.write("		<\/td>\n");
document.write("		<\/tr>\n");
document.write("		<\/table>\n");
document.write("	\n");
document.write("	<\/div>\n");
document.write("\n");
document.write("\n");
document.write("  \n");
document.write("  \n");
document.write("  <div class=\"credit\">\n");
document.write("    <div class=\"buttons\">\n");
document.write("      <a href=\"http://pastie.org/pastes/867009.txt\">\n");
document.write("      <img src=\"http://pastie.org/images/view.png\" height=\"20\" width=\"67\" /><\/a>\n");
document.write("    <\/div>\n");
document.write("  \n");
document.write("    <a href=\"http://pastie.org/867009\">Pastie #867009<\/a> linked directly from <a href=\"http://pastie.org/\">Pastie<\/a>.\n");
document.write("  <\/div><\/div>");
