From 2606485df645106e01be24ae109466ca6d447cc2 Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <vu3rdd@gmail.com>
Date: Tue, 23 Nov 2010 23:51:23 +0530
Subject: [PATCH] solution to 2.54

---
 src/sicp/ex2_54.rkt | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 src/sicp/ex2_54.rkt

diff --git a/src/sicp/ex2_54.rkt b/src/sicp/ex2_54.rkt
new file mode 100644
index 0000000..ef27b5a
--- /dev/null
+++ b/src/sicp/ex2_54.rkt
@@ -0,0 +1,13 @@
+#lang racket
+
+(define (equal? s1 s2)
+  (cond ((null? s1) (null? s2))
+        ((and (symbol? s1) 
+              (symbol? s2)) (eq? s1 s2))
+        ((and (number? s1) 
+              (number? s2)) (= s1 s2))
+        ((and (pair? s1)
+              (pair? s2)
+              (equal? (car s1) 
+                      (car s2))) (equal? (cdr s1) (cdr s2)))
+        (else #f)))
-- 
2.45.2