Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7609653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:13:28+00:00 2026-05-31T01:13:28+00:00

I am reading through a book for homework, and I understand that using #’

  • 0

I am reading through a book for homework, and I understand that using #’ is treating the variable as a function instead of a variable. But I am a little hazy on FUNCALL. I understand that lisp makes object out of variables, so is the function name just a ‘pointer’ (may be a bad word, but hopefully you get what I mean), in which case you use #’ to invoke it, or is funcall the only way to invoke them? ex.

(defun plot (fn min max step)
(loop for i from min to max by step do
      (loop repeat (funcall fn i) do (format t "*"))
      (format t "~%")))

couldn’t I just do:

(defun plot (fn min max step)
(loop for i from min to max by step do
      (loop repeat #'(fn i) do (format t "*"))
      (format t "~%")))

I guess my confusion lies in what exactly is in the function names. When I read the book, it said that the variable’s value is what will be the function object.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:13:29+00:00Added an answer on May 31, 2026 at 1:13 am

    #'function-name is (function function-name). Nothing is called, evaluating either results in the function associated with function-name (the object representing the function). funcall is used to call functions.

    See funcall and function in the HyperSpec.

    Sample session using both:

    CL-USER> (defun square (x) (* x x))
    SQUARE
    CL-USER> #'square
    #<FUNCTION SQUARE>
    CL-USER> (function square)
    #<FUNCTION SQUARE>
    CL-USER> (funcall #'square 3)
    9
    CL-USER> (funcall 'square 3)
    9
    

    The second invocation of funcall works because it also accepts a symbol as function designator (see the link for funcall above for details).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm reading The Rspec Book , and in that book they are using Webrat
I am working through the examples in a Django book that I have, but
I'm reading through the Professional iPhone Programming with MonoTouch and .NET/C# book, but I'm
I'm reading through the dragon book and trying to solve an exercise that is
recently I've been reading through Scott Meyers's excellent Effective C++ book. In one of
I'm reading through head first design patterns at the moment and while the book
Reading through some of the questions here, the general concensus seems to be that
Reading through the SendAsync , BeginAsync method illustrations of Socket s, I realized that
Whilst reading through the book The well grounded Rubyist, I came across some strange
I'm reading through a book about the C# Task Parallel Library and have the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.