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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:18:21+00:00 2026-05-13T17:18:21+00:00

When my friend started learning Prolog in school, I made fun of him for

  • 0

When my friend started learning Prolog in school, I made fun of him for learning a useless language. However, he’s showed me some stuff I never even knew possible; I want to know where this technique comes from.

The technique is this:

permutation(List) :-
    isAMember(X, List),
    deleteFirstElement(X, List, Substring),
    % and so on

In this code, isAMember(X, List) is a function that returns true if X is in List. However, up to this point X is not defined as a variable – so the program will spawn a bunch of new threads, one for each possible value of X that makes isAMember(X, List) true, and continue from there.

This allows us to create a multi-threaded algorithm in the simplest, most elegant way I could have ever imagined possible.

So my question is: Is this Prolog-specific, or a feature of all logical- and/or functional-languages? Also, where can I learn more amazing multithreading techniques like this – this is surely the future of programming.

  • 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-13T17:18:22+00:00Added an answer on May 13, 2026 at 5:18 pm

    The subset of Prolog known as “Datalog” is restricted to pure logical features (no “cut”), and in principle, the proof search could be done in parallel. However you’d have to be careful because the semantics of full Prolog is quite sensitive to the order in which results are produced, and some real Prolog programs depend on this.

    The situation in pure functional languages like Haskell and Clean is a bit better—it is always safe to evaluate subexpressions in parallel—but there are many challenges of performance. If you do extreme parallelism (every subexpression) you don’t get any performance gains because of all the overhead. The promising approaches at the moment seem to be

    • Threads (Concurrent Haskell)

    • Data Parallel Haskell

    • “Sparks” with par and seq operators.

    The parallel functional stuff has been around for almost 30 years and people are still trying to make it perform well. If you want more information, try

    • Recent proceedings of the ACM Symposium on Haskell (and before that, the Haskell workshop)

    • The work of Arvind at MIT, who was a great pioneer in this area (check out his book with R. Nikhil on parallel programming with pH)

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

Sidebar

Related Questions

Basically started with Squid and iptables today (google is your friend). This stuff is
a friend of mine's joomla site started behaving very strangely... it has some errors
I have a friend and he recently started to learn Cinema 4D. He asked
Now I'm following one more friend and now I started to learn PLT Scheme(using
I have started learning Twitter4j API and have got all credentials and tokens from
I just started learning about servers, and I am messing around with Google's App
Me and my friend started working together as partners , we have decided to
Since I started this new webshop for a friend to launch, which still in
I recently started reading through Paul Graham's On Lisp with a friend, and we
I have created some C++ classes to model a Solitaire game as a learning

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.