#lang scheme (provide make-modern modern-name modern-pop modern? make-ancient ancient-name ancient-age ancient-left ancient-right ancient? human chimp rat chicken worm fruit-fly primate mammal vertebrate invertebrate animal north-america eurasia oceania south-america africa laurasia east-gondwana gondwana pangaea) ;; A Taxon is one of: ;; * a Modern ;; * an Ancient (define-struct modern (name pop) #:transparent) ;; A Modern is a (make-modern Str Nat) ;; where name is the common name of the species/group ;; pop is the population (define-struct ancient (name age left right) #:transparent) ;; An Ancient is a (make-ancient Str Nat Taxon Taxon) ;; where name is the common name of the species/group ;; age is the number of millions of years ago the split occurred ;; left, right are new species/group after the split ;; Sample data (define human (make-modern "human" 6500000000)) (define chimp (make-modern "chimpanzee" 100000)) (define rat (make-modern "rat" 1000000000)) (define chicken (make-modern "chicken" 15000000000)) (define worm (make-modern "worm" 50000000000)) (define fruit-fly (make-modern "fruit fly" 100000000000)) (define primate (make-ancient "primate" 5 human chimp)) (define mammal (make-ancient "mammal" 65 primate rat)) (define vertebrate (make-ancient "vertebrate" 320 mammal chicken)) (define invertebrate (make-ancient "invertebrate" 530 worm fruit-fly)) (define animal (make-ancient "animal" 535 vertebrate invertebrate)) (define north-america (make-modern "North America" 529000000)) (define eurasia (make-modern "Eurasia" 4618000000)) (define oceania (make-modern "Oceania" 36000000)) (define south-america (make-modern "South America" 388000000)) (define africa (make-modern "Africa" 1111000000)) (define laurasia (make-ancient "Laurasia" 135 north-america eurasia)) (define east-gondwana (make-ancient "East Gondwana" 130 oceania south-america)) (define gondwana (make-ancient "Gondwana" 184 east-gondwana africa)) (define pangaea (make-ancient "Pangaea" 200 laurasia gondwana))