meander

noprompt 2023-06-16T04:26:54.200689Z

Instruction: Using the meander library in Clojure, demonstrate how to extract all of the values of the keys :x and :y from a sequence of maps. Output: To extract all of the values of the keys :x and :y from a sequence of maps using the meander library in Clojure, we can use the following code:

clojure
(require '[meander.epsilon :as m])

(defn extract-xy [maps]
  (m/search [:x :y] maps))
This function takes a sequence of maps as input and returns a sequence of all of the values of the keys :x and :y in those maps. The search function from the meander library is used to match the pattern [:x :y] against each map in the sequence. The result of the search is a sequence of all of the values of the keys :x and :y in the sequence of maps.

noprompt 2023-06-16T04:27:01.256149Z

Gotta give it credit for trying.

noprompt 2023-06-16T04:27:08.050859Z

https://huggingface.co/WizardLM/WizardCoder-15B-V1.0

noprompt 2023-06-16T04:27:46.166129Z

☝️ In all seriousness, this model isn't half bad at generating code.

noprompt 2023-06-16T04:38:19.583659Z

It actually managed to cough up an almost working LC interpreter.

noprompt 2023-06-16T04:27:57.595029Z

Just not Clojure code LOL

👍 2