lisp lambda function -


 (repeat-transformation #'(lambda (x) (* 2 x)) 4 1) 

this lisp lambda function , don't understand last "1" ? thanks.

definition: repeat-transformation (f n x)

repeat applying function f on object x n times.

you're defining lambda function called repeat-transformation 4 times on integer 1.

hope explains it.


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -