Lisp looping through a list in a function -
i have method , keep calling doing following
(function1 (first lst)) (function1 (second lst)) (function1 (third lst))
this goes on five. i'm wondering if there function can create me, when created call 1 method instead of calling 5 times.
given previous question recommend looking mapcar , reduce , try getting feel them.
they take bit of getting used if more used loops better solution.
for example:
(mapcar #'function lst)
will call function on each element of list returning list of results.
Comments
Post a Comment