lispworks - Lisp Illegal argument in functor position -


hello can me out?

(defun f(x)     (list ((* 2 x) (* 3 x))) )  (f 1) 

i this, illegal argument in functor position: (* 2 x) in ((* 2 x) (* 3 x)).

it should be:

(defun f (x)     (list (* 2 x) (* 3 x))) 

you have set of parentheses around arguments list. when expression list, first thing supposed function call,

((* 2 x) (* 3 x)) 

is not valid expression because (* 2 x) not function.


Comments

Popular posts from this blog

How to access named pipes using JavaScript in Firefox add-on? -

multithreading - OPAL (Open Phone Abstraction Library) Transport not terminated when reattaching thread? -

node.js - req param returns an empty array -