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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:23:52+00:00 2026-05-20T09:23:52+00:00

I have a large sequence of data-maps and each map needs to be classified

  • 0

I have a large sequence of data-maps and each map needs to be classified in a nested fashion.

i.e. a given item may be an A or a B (as determined by a function), if it is a B then it may be a C or a D (determined by another function) and so on down. At each stage more data relating to the classification may be added to each map. The functions to do the classification are themselves quite complex and may need to bring in additional data to make the determinations.

Would a self-recursive multimethod be a good way to structure the code to do this? I would dispatch on the most specific type so far determined for an item, or return the best current classification when nothing further can be done.

I could get the desired effect with nested ifs inside a single classification function but gosh is that ugly.

Is a multimethod a good fit here or am I over-complicating things and missing a simpler way of structuring the code?

  • 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-20T09:23:53+00:00Added an answer on May 20, 2026 at 9:23 am

    Seems like multimethods might be useful here. I guess all the complexity is in the dispatch function? So once you classify the top level you fire the multimethod again with more info that triggers a different instance?

    Another way to think this is to base it around traversing the decision tree instead of traversing your input. I wonder whether using clojure.zip to traverse a tree of classification functions might be an interesting solution. Your classification function at each node could tell you how to next traverse the tree (which child to go to). You wouldn’t need clojure.zip necessarily but it has the tree navigation in it already.

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

Sidebar

Related Questions

I have a large data table that contains a checkbox for each row. I
I'd like to group a sequence into a map of sequences, based on a
I have a large multi-directional form that validates almost all fields with Jquery Validator,
I have a large file (bigger then RAM, can't read whole at once) and
I have a large chunk of legacy php code that I need to interface
First, a little background. I have two ASP.NET web applications that use SQLServer session
I am using forms authentication, and have a timeout of 30 minutes. What I
I am having quite a tricky problem, which i just cannot seem to solve.
How can I stop one SWF file playing when playing another in a HTML
Not sure if this really belongs here, so please move it if it doesn't.

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.