First things first. One does not simply say that the pil interpreter is missunderstanding. Secondly does 'pack fix your problem? Do you know the difference between a list of chars and a "string-like Symbol"?
2016-12-10 23:01 GMT+01:00 dean <deangwillia...@gmail.com>: > The following program shows me trying to extract a function name from a > "string" and execute the function using the string. > The function is called some_fn. > If I type (some_fn) directly...all is well. > When I first executed (Fn) that I THOUGHT held the function name...it > didn't so I dropped into the REPL and played until I got (some_fn) returned > i.e. by (str (glue "" Fn)) i.e. -> (some_fn) > I thought putting this in my program would call some_fn but it doesn't and > I don't understand why. > Thank you in anticipation > Dean > > (setq Lmnu > '(mAin_mnu-some_fn)) > > (de some_fn () > (prinl "yes in some_fn")) > > (de lmnu_to_mnu_tbl (Lmnu Lkey) > (for Ele Lmnu > ( > ifn (car Ele) > (prog > (setq Optn_fn_pair (split (chop Ele) '-)) > (setq Optn (get Optn_fn_pair 1)) > (setq Fn (get Optn_fn_pair 2)) > > (some_fn) #this worked fine > > #! > #: (Fn) #this didn't 'cos Fn contained "s" "o" "m"..... > #-> "n" > #: (glue "" Fn) > #-> "some_fn" > #: (str (glue "" Fn)) #this looked to evaluate to (some_fn) which worked > above > #-> (some_fn) > > #(str (glue "" Fn)) #but executing it didn't call some_fn > #((str (glue "" Fn))) #nor did evaluating what got returned > ) > (prog > # (printsp Ele 'is 'a 'list) > # (prinl) > ) > ) > ) > ) > > (debug 'lmnu_to_mnu_tbl) > (lmnu_to_mnu_tbl Lmnu ()) >