From ca50e005314e5b48683afa8fb94522a89b1c4924 Mon Sep 17 00:00:00 2001
From: Glen Whitney <glen@nobody@nowhere.net>
Date: Tue, 27 Aug 2024 01:59:14 +0000
Subject: [PATCH] Update Examples

---
 Examples.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/Examples.md b/Examples.md
index 5214bb7..74a55f4 100644
--- a/Examples.md
+++ b/Examples.md
@@ -1079,4 +1079,58 @@ fn main
     let another = x: i64 -> i64 --> x*x
     // but not too bad I think
 ```
-Of course, there's no real reason to implement that until/unless we actually want anonymous regular (non-closure) functions.
\ No newline at end of file
+Of course, there's no real reason to implement that until/unless we actually want anonymous regular (non-closure) functions.
+
+##### Capturing
+
+<table>
+<tr>
+<th>Rust</th>
+<th>Husht</th>
+</tr>
+<tr>
+<td>
+
+```
+fn main() {
+    use std::mem;
+
+    let consume = || {
+        println!("`movable`: {:?}", movable);
+        mem::drop(movable);
+    };
+
+    // `consume` consumes the variable so this can only be called once.
+    consume();
+
+    let haystack = vec![1, 2, 3];
+
+    let contains = move |needle| haystack.contains(needle);
+
+    println!("{}", contains(&1));
+    println!("{}", contains(&4));
+}
+```
+</td><td>
+
+```
+fn main
+    use std::mem
+
+    let consume = =>
+        println! "`movable`: {:?}", movable
+        mem::drop  movable
+
+    // `consume` consumes the variable so this can only be called once.
+    consume()
+
+
+    let haystack = vec![1, 2, 3]
+
+    let contains = move needle => haystack.contains needle
+
+    println! "{}", contains(&1)  //! That we need the & is Rust weirdoness
+    println! "{}", contains(&4)
+
+```
+</td></tr></table>