Permalink
Browse files

Problem added - Juxtaposition

  • Loading branch information...
1 parent 4f4c59c commit 2b52c29fc3465946a6544e5ca31494f5db04970d @dbyrne dbyrne committed Apr 25, 2011
Showing with 12 additions and 1 deletion.
  1. +12 −1 src/foreclojure/data_set.clj
@@ -603,4 +603,15 @@
:tests ["(= [3 2 1] ((__ rest reverse) [1 2 3 4]))"
"(= 5 ((__ (partial + 3) second) [1 2 3 4]))"
"(= true ((__ zero? #(mod % 8) +) 3 5 7 9))"
- "(= \"HELLO\" ((__ #(.toUpperCase %) #(apply str %) take) 5 \"hello world\"))"]})))
+ "(= \"HELLO\" ((__ #(.toUpperCase %) #(apply str %) take) 5 \"hello world\"))"]})
+
+ (insert! :problems
+ {:_id 59
+ :title "Juxtaposition"
+ :times-solved 0
+ :restricted ["juxt"]
+ :description "Take a set of functions and return a new function that takes a variable number of arguments and returns a sequence containing the result of applying each function left-to-right to the argument list."
+ :tags ["medium" "higher-order-functions" "core-functions"]
+ :tests ["(= [21 6 1] ((__ + max min) 2 3 5 1 6 4))"
+ "(= [\"HELLO\" 5] ((__ #(.toUpperCase %) count) \"hello\"))"
+ "(= [2 6 4] ((__ :a :c :b) {:a 2, :b 4, :c 6, :d 8 :e 10}))"]})))

0 comments on commit 2b52c29

Please sign in to comment.