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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:05:45+00:00 2026-05-13T06:05:45+00:00

EDIT: My question was originally Is there a standard name for a function that

  • 0

EDIT: My question was originally “Is there a standard name for a function that flattens a list of lists, but only one level deep?”, but Chuck’s answer is phrased much closer to what I actually wanted to ask, so I renamed it. All three answers were useful to me, though. Thanks.

‘flatten’ seems to be a well-accepted name for a function that takes a tree and builds a list of atoms however deep they are nested, but what about a function that stops after just one level? So ((1 2) ((3 4) (5 6)) (7 8)) “somethings” to (1 2 (3 4) (5 6) 7 8). Does “something” have a common name across multiple languages/libraries?

The answers to this question:

Flattening a shallow list in Python

suggest that ‘chain’ might be a good guess, but is it common enough to be “standard”?

  • 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-13T06:05:46+00:00Added an answer on May 13, 2026 at 6:05 am

    The function that takes a list of lists and returns a single list containing the contents of those lists is called “concat” in many functional languages (e.g. OCaml, F#, Haskell, Clojure).

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

Sidebar

Related Questions

Edit: original question below, but I revise it now that I have some code
This is somewhat of a broad question, but it is one that I continue
EDIT: This question was originally about checkboxes, but I am getting the same behavior
edit: I completely rewrote the question as the original one didn't clearly explain my
Edit: this question is outdated. The jsonlite package flattens automatically. I am dealing with
--EDIT-- I believe this is a valid question that may have multiple answers (as
EDIT: woah ... somehow i replaced this question with another one i was asking,
EDIT: This question title originally was: How does Doctrine know last inserted id in
I'm looking for a multi-byte function to replace preg_match_all() . I need one that
I was originally going to make this a longer question, but I feel like

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.