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

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -