From 3bdf14720ceffddc6940872be43e262d9176712f Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 1 Sep 2018 12:03:26 -0700 Subject: [PATCH] [types] Expand the documentation of Numbers --- types/src/number/mod.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/types/src/number/mod.rs b/types/src/number/mod.rs index a8277bd..65fac0a 100644 --- a/types/src/number/mod.rs +++ b/types/src/number/mod.rs @@ -2,9 +2,14 @@ * Eryn Wells */ -/// # Numbers -/// -/// Scheme numbers are complex, literally. +//! # Numbers +//! +//! Scheme numbers are complex, literally. The model it uses is a hierarchy of types called the +//! Number Tower. It consists of four types, in order: Integers, Rationals (or Fractionals), +//! Irrationals (or Reals), and Complex Numbers. Each type going down the tower can be +//! unequivocally cast to the type below it, but the reverse is not necessarily true. So, an +//! Integer can be cast as a Rational (by putting its value over 1), but a Rational like 1/2 cannot +//! be represented as an Integer. mod integer;