Skip to content

Instantly share code, notes, and snippets.

@PEZ
Last active September 6, 2021 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PEZ/efe2f5aa74f08899ea993bdfaab8da59 to your computer and use it in GitHub Desktop.
Save PEZ/efe2f5aa74f08899ea993bdfaab8da59 to your computer and use it in GitHub Desktop.
Lists: conj – Rich 4Clojure Problem 5 – See: https://github.com/PEZ/rich4clojure
(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!
@evedes
Copy link

evedes commented Sep 6, 2021

'(1 2 3 4)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment