Last active
November 1, 2024 20:47
-
-
Save PEZ/82981313411b066055f5a1d1a1e10037 to your computer and use it in GitHub Desktop.
Intro to Vectors – Rich 4Clojure Problem 6 – See: https://github.com/PEZ/rich4clojure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns rich4clojure.elementary.problem-006 | |
| (:require [hyperfiddle.rcf :refer [tests]])) | |
| ;; = Intro to Vectors = | |
| ;; By 4Clojure user: dbyrne | |
| ;; Difficulty: Elementary | |
| ;; | |
| ;; Vectors can be constructed several ways. You can | |
| ;; compare them with lists. | |
| ;; | |
| ;; Note: You can't redefine `__` to solve this problem. | |
| ;; You will need to replace `__` in the `(tests ...)` | |
| ;; form. | |
| (def __ :tests-will-fail) | |
| (comment | |
| ) | |
| (tests | |
| [__] := (list :a :b :c) (vec '(:a :b :c)) (vector :a :b :c)) | |
| ;; To participate, fork: | |
| ;; https://github.com/PEZ/rich4clojure | |
| ;; Post your solution below, please! |
(comment
(def x (list 4 6 8))
(def y (vec x))
(def z (vector 4 6 8))
(= x y z))[:a :b :c]
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
:a :b :c