Last active
September 6, 2021 16:48
-
-
Save PEZ/efe2f5aa74f08899ea993bdfaab8da59 to your computer and use it in GitHub Desktop.
Lists: conj – Rich 4Clojure Problem 5 – See: https://github.com/PEZ/rich4clojure
This file contains 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-005 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Lists: conj = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Elementary | |
;; | |
;; When operating on a list, the conj function will return | |
;; a new list with one or more items "added" to the front. | |
;; | |
;; Note that there are two test cases, but you are | |
;; expected to supply only one answer, which will cause | |
;; all the tests to pass. | |
(def __ :tests-will-fail) | |
(comment | |
) | |
(tests | |
__ := (conj '(2 3 4) 1) | |
__ := (conj '(3 4) 2 1)) | |
;; To participate, fork: | |
;; https://github.com/PEZ/rich4clojure | |
;; Post your solution below, please! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'(1 2 3 4)