LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-02-2011, 08:19 AM   #1
wje_lq
Member
 
Registered: Sep 2007
Location: Mariposa
Distribution: Debian lenny, Slackware 12
Posts: 808

Rep: Reputation: 178Reputation: 178
LISP: displaying a function definition


Suppose I have a function defined thus:
Code:
(defun square (x) (* x x))
and I want to output the function's definition. Is there something I can say like
Code:
(wharblewharble 'square)
and get something printed out like:
Code:
(defun square (x) (* x x))
Edit:
Never mind, I found the (or at least an) answer:
Code:
(print #'square)

Last edited by wje_lq; 02-02-2011 at 08:27 AM. Reason: found the answer myself
 
Old 02-03-2011, 01:06 AM   #2
EricTRA
Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 18 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290Reputation: 1290
Hi,

Glad you found a solution. Off the Zero Reply List.

Kind regards,

Eric
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Successor function in LISP AceKnocks Programming 12 04-08-2008 12:00 PM
Help: Problem writing simple LISP-function! raskol Programming 3 03-28-2008 06:20 PM
Make a function a constant part of LISP? raskol Programming 1 03-28-2008 03:23 PM
Emacs LISP - function and keymap? jantman Programming 5 09-28-2006 11:59 AM
Displaying the table definition on Postgres mkrishnanand Programming 1 08-18-2004 03:51 PM


All times are GMT -5. The time now is 03:19 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration