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

  • SEARCH
  • Home
  • 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 8266515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T05:11:16+00:00 2026-06-08T05:11:16+00:00

I am discussing closure with a friend and he thinks (partial + 5) is

  • 0

I am discussing closure with a friend and he thinks (partial + 5) is a closure. But I think a closure is a function closing over a free variable, for example

(let [a 10]
  (defn func1 [x] (+ x a))
)

then func1 is a closure. But in this case 5 is not a free variable. So which is the right answer?

  • 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-06-08T05:11:18+00:00Added an answer on June 8, 2026 at 5:11 am

    partial uses a closure to make the partial function. Check out the code of partial by using (source partial) in repl and you will see that it uses closures.

    (defn partial
      "Takes a function f and fewer than the normal arguments to f, and
      returns a fn that takes a variable number of additional args. When
      called, the returned function calls f with args + additional args."
      {:added "1.0"}
      ([f arg1]
       (fn [& args] (apply f arg1 args)))
      ([f arg1 arg2]
       (fn [& args] (apply f arg1 arg2 args)))
      ([f arg1 arg2 arg3]
       (fn [& args] (apply f arg1 arg2 arg3 args)))
      ([f arg1 arg2 arg3 & more]
       (fn [& args] (apply f arg1 arg2 arg3 (concat more args)))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was discussing neural networks (NN) with a friend over lunch the other day
When discussing sealed classes, the term virtual function table is mentioned quite frequently. What
We're discussing the performance impact of putting a common function/procedure in a separate package
We're discussing oo-functional hybrids here, but I wonder, how many languages actually qualify for
I've seen topics discussing this but no one has seemed to post a solution.
There are countless articles and blogs discussing C++'s most vexing parse , but I
On this page discussing font lock mode , an example is provided which highlights
I was discussing multiple inheritance vs. single inheritance with a friend of mine, and
This code discussing named arguments in Clojure from The Joy of Clojure: (defn slope
(I found some questions discussing the idea, but I didn't see a solution for

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.