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 8084939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T17:56:50+00:00 2026-06-05T17:56:50+00:00

Context Clojure Agents are NOT sent new values. They are sent a function which

  • 0

Context

Clojure Agents are NOT sent new values. They are sent a function which is applied to the old value. In the initial days of programing, I found this counter intuitive, and often wrote code of the form:

(send some-atom (fn [old] new_value))

Then, gradually, I realized how awesome it was to send an update-function rather than a new value.

Question:

Where does this idea originally come from? What is sending update-function (instead of a new value) called? Is this idea part of a more general set of techniques for a different way to handle concurrency?

Thanks!

  • 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-05T17:56:52+00:00Added an answer on June 5, 2026 at 5:56 pm

    Rich Hickey refers to this as something like a functional time model in this video. To paraphrase; in traditional OO languages an identity is an object that goes from one state at time-1 to another at time-2 by locking the object, then editing the object so that it has effectively always been at in the state it is in at time-2, then unlocking it. You have to lock it to make sure nobody looks at it between states. In the baseball game example from that video this is akin to making everyone in the stadium close their eyes and clear their mind every time the ball moves. It’s worth the time to watch the original video.

    the principal is that "the future is a function of the past"

    an identity is a series of states and functions define the transitions between these states

    ohh and to answer the original question Rich credits the idea to Alfred North Whitehead

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

Sidebar

Related Questions

Note: A closure cannot call any user-defined function, because the function's context is not
I'm using Maven in the context of another build-tool (leiningen for Clojure, but this
Context Suppose I have protocols ICursor, IFoo, IBar then I can have a function
I'm using Clojure, so this is in the context of Java regexes. Here is
I've written some basic graphing software in Clojure/Java using drawLine() on the graphics context
Context: I have a clojure-based crossword app whose main ui is a JTabbedPane with
To set some context, I'm in the process of learning Clojure, and Lisp development
In Clojure you can unquote-splice a list of values to generate code, e.g. (def
I'm relatively new to Clojure and a complete HTML/Compojure virgin. I'm trying to use
I'm trying to write a function in clojure that prints out xml using clojure.xml/emit.

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.