In short, I need defun ts_div and let it be a typical and "reasoned safe" version of the regular /
Basically, I want him to accept a list with any number of numbers in it (even without it) and be able to call it like this:
(ts_div (123 321 23))
or
(ts_div somelist)
Desired result: if there are more than two elements in the list, the first will be divided into the second, and the rest will be ignored. If the second number is 0, it should return the value of the first number. If the list is empty, it should return 0.
Any suggestions on how to achieve this?
Sidenote: I did some testing trying to make it an additional option. In principle, summarize all the numbers passed to him in the context of the list, but, as expected, he complains that the first element in the list is not a function, and I could not figure out how it softens.
source share