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.easy.problem-061 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Map Construction = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Easy | |
;; Tags: [core-functions] | |
;; | |
;; Write a function which takes a vector of keys and a | |
;; vector of values and constructs a map from them. |
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.easy.problem-042 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Factorial Fun = | |
;; By 4Clojure user: amalloy | |
;; Difficulty: Easy | |
;; Tags: [math] | |
;; | |
;; Write a function which calculates factorials. |
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.easy.problem-041 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Drop Every Nth Item = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Easy | |
;; Tags: [seqs] | |
;; | |
;; Write a function which drops every Nth item from a | |
;; sequence. |
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.easy.problem-034 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Implement range = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Easy | |
;; Tags: [seqs core-functions] | |
;; | |
;; Write a function which creates a list of all integers | |
;; in a given range. |
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.easy.problem-032 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Duplicate a Sequence = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Easy | |
;; Tags: [seqs] | |
;; | |
;; Write a function which duplicates each element of a | |
;; sequence. |
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-156 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Map Defaults = | |
;; By 4Clojure user: jaycfields | |
;; Difficulty: Elementary | |
;; Tags: [seqs] | |
;; | |
;; When retrieving values from a map, you can specify | |
;; default values in case the key is not found: |
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 my-dumdom.macros | |
(:require [dumdom.core :as dumdom])) | |
(defn- extract-docstr | |
[[docstr? & forms]] | |
(if (string? docstr?) | |
[docstr? forms] | |
["" (cons docstr? forms)])) | |
(defn- extract-opts |
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
{:linters {:dumdom/component-options {:level :warning}} | |
:hooks {:analyze-call {dumdom.core/defcomponent hooks.dumdom/defcomponent}}} |
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.easy.problem-021 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Nth Element = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Easy | |
;; Tags: [seqs core-functions] | |
;; | |
;; Write a function which returns the Nth element from a | |
;; sequence. |
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.easy.problem-022 | |
(:require [hyperfiddle.rcf :refer [tests]])) | |
;; = Count a Sequence = | |
;; By 4Clojure user: dbyrne | |
;; Difficulty: Easy | |
;; Tags: [seqs core-functions] | |
;; | |
;; Write a function which returns the total number of | |
;; elements in a sequence. |