Last active
May 17, 2023 00:41
-
-
Save chase-lambert/caab7aa6034cce80fb028d9c0e8b986e to your computer and use it in GitHub Desktop.
rendezvous with cassidoo challenge: 23.01.29
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 generate-arrays | |
| (:require [clojure.test :refer [deftest is])) | |
| (defn generate-arrays [n] | |
| (mapv #(vec (range 1 (inc %))) (range 1 (inc n)))) | |
| (deftest generate-arrays-test | |
| (is (= (generate-arrays 4) [[1] [1 2] [1 2 3] [1 2 3 4]])) | |
| (is (= (generate-arrays 1) [[1]]))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment