< Back to IRCAM Forum

Lispfunction: error in lambda expression

Bonjour

I am following

https://support.ircam.fr/docs/om/om6-manual/co/LispFunctions.html
https://support.ircam.fr/docs/om/om6-manual/co/LispEditor.html

to define a lisp function to use in my patch.

I type “lisp” in a patch, and double-click the obtained “lispfunction” box.

I insert following text:

;;; Edit a valid LAMBDA EXPRESSION for “lispfunction 4”
;;; e.g. (lambda (arg1 arg2 …) ( … ))

(lambda (a b c)
(let ((x (+ a 5)))
(* x (/ b c))))

but when saving, the listener says

“This Lisp Patch is not a persistant object. Drag the box to the workspace to save it as a patch file.”

I do this, but when saving now, the lisp function box says

What am I doing wrong? (OM 6.16)

Salutations