aboutsummaryrefslogtreecommitdiff
path: root/docs/posts/auto-currying_rust_functions
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-05-10 15:34:46 +0100
committerAkshay <[email protected]>2020-05-10 15:34:46 +0100
commitbc27a5c7b1bd4138076c3c1e7c19dc69cc097443 (patch)
tree78b0cd62b891c43ce1dd62c28fe82d3fc475e550 /docs/posts/auto-currying_rust_functions
parent40cefb2ff08d0e872408c8218b5d4d22d2c5ba11 (diff)
fix erronous macro examples
Diffstat (limited to 'docs/posts/auto-currying_rust_functions')
-rw-r--r--docs/posts/auto-currying_rust_functions/index.html8
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/posts/auto-currying_rust_functions/index.html b/docs/posts/auto-currying_rust_functions/index.html
index 2ed5419..db70890 100644
--- a/docs/posts/auto-currying_rust_functions/index.html
+++ b/docs/posts/auto-currying_rust_functions/index.html
@@ -85,9 +85,11 @@ h(x)(y)(z) = g(y)(z) = k(z) = v</code></pre>
85<h3 id="procedural-macros">Procedural Macros</h3> 85<h3 id="procedural-macros">Procedural Macros</h3>
86<p>These are functions that take code as input and spit out modified code as output. Powerful stuff. Rust has three kinds of proc-macros:</p> 86<p>These are functions that take code as input and spit out modified code as output. Powerful stuff. Rust has three kinds of proc-macros:</p>
87<ul> 87<ul>
88<li>Function like macros: <code>println!</code>, <code>vec!</code>.</li> 88<li>Function like macros<br />
89<li>Derive macros: <code>#[derive(...)]</code>, used to automatically implement traits for structs/enums.</li> 89</li>
90<li>and Attribute macros: <code>#[test]</code>, usually slapped onto functions.</li> 90<li>Derive macros: <code>#[derive(...)]</code>, used to automatically implement traits for structs/enums<br />
91</li>
92<li>and Attribute macros: <code>#[test]</code>, usually slapped onto functions</li>
91</ul> 93</ul>
92<p>We will be using Attribute macros to convert a Rust function into a curried Rust function, which we should be able to call via: <code>function(arg1)(arg2)</code>.</p> 94<p>We will be using Attribute macros to convert a Rust function into a curried Rust function, which we should be able to call via: <code>function(arg1)(arg2)</code>.</p>
93<h3 id="definitions">Definitions</h3> 95<h3 id="definitions">Definitions</h3>