Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Destructuring problem tweaked again

  • Loading branch information...
commit 95707b7429f85ee23c85c1039ec3d555379fabe1 1 parent 91ca821
@dbyrne dbyrne authored
Showing with 10 additions and 3 deletions.
  1. +10 −3 src/foreclojure/data_set.clj
View
13 src/foreclojure/data_set.clj
@@ -518,8 +518,8 @@
:title "Advanced Destructuring"
:times-solved 0
:description "Here is an example of some more sophisticated destructuring."
- :tags ["medium" "destructuring"]
- :tests ["(= __ (let [[a b & c :as d] [1 2 3 4 5]] [a b c d]))"]})
+ :tags ["easy" "destructuring"]
+ :tests ["(= [1 2 [3 4 5] [1 2 3 4 5]] (let [[a b & c :as d] __] [a b c d]))"]})
(insert! :problems
{:_id 52
@@ -527,4 +527,11 @@
:times-solved 0
:description "Let bindings and function parameter lists support destructuring."
:tags ["easy" "destructuring"]
- :tests ["(= [2 4] (let [[a b c d e f g] (range)] __))"]})))
+ :tests ["(= [2 4] (let [[a b c d e f g] (range)] __))"]})))
+
+
+(doseq [{id :_id :keys [test secrets]}
+ (fetch :problems)]
+ (update! :problems
+ {:_id id}
+ {:$set {:test (concat test secrets) :secrets []}}))
Please sign in to comment.
Something went wrong with that request. Please try again.