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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:32:46+00:00 2026-05-27T22:32:46+00:00

Simple question, given a list like this Clear[a, b, c, d, e, f]; lst

  • 0

Simple question, given a list like this

Clear[a, b, c, d, e, f];
lst = {{a, b}, {c, d}, {e, f}};

and suppose I have a function defined like this:

foo[x_,y_]:=Module[{},...]

And I want to apply this function to the list, so If I type

Map[foo, lst]

This gives

{foo[{a, b}], foo[{c, d}], foo[{e, f}]}

I want it to come out as

{foo[a, b], foo[c, d], foo[e, f]}

so it works.

What is the best way to do this? Assume I can’t modify the function foo[] definition (say it is build-in)

Only 2 ways I know now are

Map[foo[#[[1]], #[[2]]] &, lst]
{foo[a, b], foo[c, d], foo[e, f]}

(too much work), or

MapThread[foo, Transpose[lst]]
{foo[a, b], foo[c, d], foo[e, f]}

(less typing, but need to transpose first)

Question: Any other better ways to do the above? I looked at other Map and its friends, and I could not see a function to do it more directly than what I have.

  • 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-27T22:32:47+00:00Added an answer on May 27, 2026 at 10:32 pm

    You need Apply at Level 1 or its short form, @@@

    foo@@@lst    
    {foo[a, b], foo[c, d], foo[e, f]}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

simple question... Given I have an ASP.NET site, which uses a [custom] RoleProvider, Is
A little stuck here. I have a simple question I guess. Given the following
This is a purely theoretical question. Given three simple classes: class Base { }
Simple question, how do you list the primary key of a table with T-SQL?
Simple question, hopefully an easy way and just want to verify I'm doing it
I think this is a simple question for mathematica experts. How can I maximize
My model is a simple parent/child representation looking like this public class Parent {
(I don't think I have titled this question correctly - but I don't know
I have seen this question and a number of blog posts related to using
Ill try to keep this simple and to the point. Essentially I have a

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.