Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Working though chapter 3

  • Loading branch information...
commit 9c53c2dfb11526b963c0d930655b5fc478edfe26 1 parent 39a190f
@aubreyrhodes authored
Showing with 20 additions and 0 deletions.
  1. +20 −0 my-solutions/3.4.clj
View
20 my-solutions/3.4.clj
@@ -0,0 +1,20 @@
+(def add
+ (fn [point1, point2]
+ (Point (+ (x point1) (x point2))
+ (+ (y point1) (y point2)))))
+
+(def shift_add
+ (fn [this, point]
+ (shift this (x point) (y point))))
+
+(def make
+ (fn [class, & args]
+ (apply class args)))
+
+(def equal-triangles?
+ (fn [& triangles]
+ (apply = triangles)))
+
+(def valid-triangle?
+ (fn [& points]
+ (= points (distinct points))))
Please sign in to comment.
Something went wrong with that request. Please try again.