I am simply trying to rename the map function in Clojure to gain better exposure to arbitrary inputs. The function I wrote has problems with the number of args being passed. Namely,
(defn new-map [f [& x]]
(map f x))
Moreover, the end goal is to write a mapping function that can handle nested inputs:
Input 1: [inc [[1 2 3] [4 5]] [2 1]]
Output1: [[1 2 3] [5 5]] whereby inc is a specific function f, [[1 2 3] [4 5]] is an array, and [2 1] picks out the second row first element of the array.
Input 2: [inc [[1 2 3] [4 5] [6] [7]] [[1 1] [2 2] [3]]]
Output 2: [[2 2 3] [4 6] [7] [7]]