Skip to content

Commit

Permalink
update starter file
Browse files Browse the repository at this point in the history
  • Loading branch information
tasxatzial committed Nov 7, 2024
1 parent 09da2ba commit aaf5035
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions exercises/practice/list-ops/src/list_ops.clj
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,47 @@
(defn append
"Given two vectors, it adds all the items in the second vector to the end of the first vector"
[coll1 coll2]
;; your code goes here
)
;; function body
)

(defn concatenate
"Given a vector of vectors, it combines all the vectors into one flattened vector"
[colls]
;; your code goes here
)
;; function body
)

(defn select-if
"Given a predicate and a vector, it returns the vector of all items for which predicate(item) is true"
[pred coll]
;; your code goes here
)
;; function body
)

(defn length
"Given a vector, it returns the number of items within it"
[coll]
;; your code goes here
)
;; function body
)

(defn apply-to-each
"Given a function and a vector, it returns the vector of the results of applying function(item) on all items"
[f coll]
;; your code goes here
)
;; function body
)

(defn foldl
"Given a function, a vector, and initial accumulator, it folds (reduces) each item into the accumulator from the left"
[f coll acc]
;; your code goes here
)
;; function body
)

(defn foldr
"Given a function, a vector, and an initial accumulator, it folds (reduces) each item into the accumulator from the right"
[f coll acc]
;; your code goes here
)
;; function body
)

(defn reverse-order
"Given a vector, it returns a vector with all the original items, but in reverse order"
[coll]
;; your code goes here
)
;; function body
)

0 comments on commit aaf5035

Please sign in to comment.