Here we add some hair to make hacking easier, but somewhat obscuring the mathematical ideas. (Here is an earlier clunkier version which may yet have merit.)

To our Clifford packet we add

• (alpha t), corresponding to Wikipedia’s α(t),
• the antiautomorphism (tr x) transpose: xt
• and the ‘conjugate’ (bar x) = x̄.
• basis is a list of the basis vectors for Vn within Cn.
• (rls r) yields the real r within Cn. rls maps from reals to the copy of the reals within the algebra.
```(define (G f)
(apply (lambda (tr bar alpha sg zer zer? one + - * rls basis) (list
(lambda (x) (cons (tr (car x)) (bar (cdr x)))) ; tr
(lambda (x) (cons (bar (car x)) (- (tr (cdr x))))) ; bar
(lambda (x) (cons (alpha (car x)) (- (alpha (cdr x))))) ; alpha, called conj earlier
(lambda () (cons (sg) (sg))) ; sg
(cons zer zer) ; zer
(lambda (a) (and (zer? (car a)) (zer? (cdr a)))) ; zer?
(cons one zer) ; one
(lambda (a b) (cons (+ (car a)(car b))(+ (cdr a)(cdr b)))) ; +
(lambda (a) (cons (-(car a))(-(cdr a)))) ; - (negation)
(lambda (a b) (cons (+ (* (car a)(car b))(-(* (cdr a)(alpha (cdr b))))) ; *
(+ (* (car a)(cdr b))(* (cdr a)(alpha (car b))))))
(lambda (x)(cons (rls x) zer)) ; rls
(cons (cons zer one) (map (lambda (x) (cons x zer)) basis)) ; basis
)) f))
```
; Use definitions for Do and grc4 for a pseudo random number generator.
```(define rr (let ((ig (grc4 "vjoe"))) (lambda ()(/ (ig 1)(+ 1 (ig 1))))))
```
; As in the division algebras we boot the process with the reals: (substitute your favorite field here.)
```(define reals (let ((i (lambda (x) x))) (list i i i rr 0 zero? 1 + - *
i '())))
```
; Now we build the 4th Clifford algebra C4 thus:
```(define P (G (G (G (G reals)))))
```
; and unpack the tools from the result p:
```(define tr (car P)) ; transpose
(define bar (cadr P)) ; conjugate (bar)
(define Ha (caddr P)) ; main involution
(define p (cdddr P)) ; rest
(define Cr (car p)) ; sample generator
(define C0 (cadr p)) ; 0
(define C0? (caddr p)) ; 0 predicate
(define q (cdddr p)) ; rest of tools
(define C1 (car q)) ; multiplicative identity
(define C- (lambda (x y) (C+ x ((caddr q) y)))) ; subtraction
(define C* (cadddr q)) ; multiplication
(define r (cddddr q)) ; rest of tools
(define Hrls (car r)) ; returns Clifford number corresponding to real.
(define basis (cadr r)) ; list of basis vectors of V as Clifford numbers.
; Define.
(define (even a)(C* (Hrls 1/2)(C+ a (Ha a)))) ; even part of Clifford number
(define (odd a)(C* (Hrls 1/2)(C- a (Ha a)))) ; odd part of Clifford number
(define (rv) (let rv ((x basis)) (if (null? x) C0
(C+ (C* (Hrls (rr)) (car x)) (rv (cdr x)))))) ; a random vector generator

(define g0 (car basis)) ; individual Clifford number basis elements for V in C.
```(let ((a (rv))) (equal? (Ha a)(C- C0 a))) ; => #t