From bc27a5c7b1bd4138076c3c1e7c19dc69cc097443 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 10 May 2020 20:04:46 +0530 Subject: fix erronous macro examples --- docs/index.html | 4 ++-- docs/index.xml | 8 +++++--- docs/posts/auto-currying_rust_functions/index.html | 8 +++++--- 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'docs') diff --git a/docs/index.html b/docs/index.html index e426877..24d080e 100644 --- a/docs/index.html +++ b/docs/index.html @@ -8,13 +8,13 @@ - + peppe.rs

n

-

nerdypepper's μblog

+

nerdypepper's μsings

diff --git a/docs/index.xml b/docs/index.xml index dce3d00..07120bc 100644 --- a/docs/index.xml +++ b/docs/index.xml @@ -60,9 +60,11 @@ h(x)(y)(z) = g(y)(z) = k(z) = v

Procedural Macros

These are functions that take code as input and spit out modified code as output. Powerful stuff. Rust has three kinds of proc-macros:

    -
  • Function like macros: println!, vec!.
  • -
  • Derive macros: #[derive(...)], used to automatically implement traits for structs/enums.
  • -
  • and Attribute macros: #[test], usually slapped onto functions.
  • +
  • Function like macros
    +
  • +
  • Derive macros: #[derive(...)], used to automatically implement traits for structs/enums
    +
  • +
  • and Attribute macros: #[test], usually slapped onto functions

We will be using Attribute macros to convert a Rust function into a curried Rust function, which we should be able to call via: function(arg1)(arg2).

Definitions

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

Procedural Macros

These are functions that take code as input and spit out modified code as output. Powerful stuff. Rust has three kinds of proc-macros:

    -
  • Function like macros: println!, vec!.
  • -
  • Derive macros: #[derive(...)], used to automatically implement traits for structs/enums.
  • -
  • and Attribute macros: #[test], usually slapped onto functions.
  • +
  • Function like macros
    +
  • +
  • Derive macros: #[derive(...)], used to automatically implement traits for structs/enums
    +
  • +
  • and Attribute macros: #[test], usually slapped onto functions

We will be using Attribute macros to convert a Rust function into a curried Rust function, which we should be able to call via: function(arg1)(arg2).

Definitions

-- cgit v1.2.3