From c7979df8b20d847e9fe844641ac764f2069577bc Mon Sep 17 00:00:00 2001 From: "Carol (Nichols || Goulding)" Date: Wed, 29 Jun 2016 22:06:24 -0600 Subject: [PATCH] Give more enum motivation in the intro paragraph Taking suggestions from @aturon. I like how this foreshadows why this chapter has sections on patterns. Connects to #106. --- src/ch06-01-enums.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/ch06-01-enums.md b/src/ch06-01-enums.md index 0b8d447..7df718e 100644 --- a/src/ch06-01-enums.md +++ b/src/ch06-01-enums.md @@ -1,12 +1,13 @@ # Enums -Next, let’s look at a feature of Rust that’s similar to structs, but also -different. Enumerations, or ‘enums’ as they’re more commonly called, -are an extremely powerful feature of Rust. Enums are a feature that are in many -languages, but what they can do is different per-language. Rust’s enums are -most similar to enums in functional languages. +Next, let’s look at *enumerations*, which allow you to define a type by +enumerating its possible values. Commonly called "enums", these unlock a lot of +power in Rust when combined with pattern matching. Enums are a feature that are +in many languages, but what they can do is different per-language. Rust’s enums +are most similar to "algebraic data types" in functional languages like F#, +OCaml, or Haskell. -Here’s an example of an enum: +Here’s an example of an enum definition: ```rust enum IpAddrKind {