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 +++++--- generate.sh | 4 ++-- posts/auto-currying_rust_functions.md | 6 +++--- 5 files changed, 17 insertions(+), 13 deletions(-) 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

diff --git a/generate.sh b/generate.sh index aac713c..487bbc1 100755 --- a/generate.sh +++ b/generate.sh @@ -71,13 +71,13 @@ cat > ./docs/index.html << EOF - + peppe.rs

n

-

nerdypepper's μblog

+

nerdypepper's μsings

EOF diff --git a/posts/auto-currying_rust_functions.md b/posts/auto-currying_rust_functions.md index 8f60216..b2274b3 100644 --- a/posts/auto-currying_rust_functions.md +++ b/posts/auto-currying_rust_functions.md @@ -71,11 +71,11 @@ 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!`. + - Function like macros - Derive macros: `#[derive(...)]`, used to automatically - implement traits for structs/enums. + implement traits for structs/enums - and Attribute macros: `#[test]`, usually slapped onto - functions. + functions We will be using Attribute macros to convert a Rust function into a curried Rust function, which we should be able to -- cgit v1.2.3