From 6e7d7c3e00eaec8a88465410802717b86ab3c99d Mon Sep 17 00:00:00 2001 From: Javier Fernandez-Ivern Date: Fri, 22 Jan 2016 10:53:25 -0600 Subject: [PATCH] Implemented hashmap equality (addresses #116, #123) --- kotlin/src/mal/types.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kotlin/src/mal/types.kt b/kotlin/src/mal/types.kt index 3396cc0ed3..a981f4ecb1 100644 --- a/kotlin/src/mal/types.kt +++ b/kotlin/src/mal/types.kt @@ -206,6 +206,9 @@ class MalHashMap() : MalType { obj.metadata = meta return obj } + + override fun equals(other: Any?): Boolean = + (other is MalHashMap) && elements.equals(other.elements) } class MalAtom(var value: MalType) : MalType {