Skip to content

Commit

Permalink
fix contains? on sets
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbicodes committed Sep 5, 2023
1 parent 168a9ec commit 5012010
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 3 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ let editorState = EditorState.create({
:location "Philadelphia"
:description "The worldwide leader in plastic tableware."})
(destructure '[{name :name
location :location
description :description} client])`,
(let [{:keys [name location description]} client]
[name location description])`,
extensions: [basicSetup, clojure()]
})

Expand Down Expand Up @@ -175,4 +174,4 @@ function testExercisesUntilFail() {
//testSolution("nth_prime")
//loadExercise("all_your_base")
//testExercisesUntilFail()
testExercises()
//testExercises()
7 changes: 6 additions & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ function contains_Q(coll, key) {
}
}
if (types._set_Q(coll)) {
return coll.has(key)
for (const item of coll) {
if (types._equal_Q(item, key)) {
return true
}
}
return false
}
if (key in coll) { return true; } else { return false; }
}
Expand Down

0 comments on commit 5012010

Please sign in to comment.