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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:46:35+00:00 2026-05-23T19:46:35+00:00

Say, we can write something like this: zipWith (,) [1,2,3] [4,5,6] If we want

  • 0

Say, we can write something like this:

zipWith (,) [1,2,3] [4,5,6]

If we want to tuple 3 list, we can write:
zipWith3 (,,) [1,2,3] [4,5,6] [7,8,9]

We can also use zipWith4 (,,,) zipWith5(,,,,) and so on.

Now, I want to do the same thing, but using adding instead comma operator.
Is there any way to define it in the same terse way, not using lambdas like in

zipWith3 (\a b c -> a + b + c) [1, 2, 3] [4, 5, 6] [7, 8, 9]

Thanks in advance for any answer.

  • 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-23T19:46:36+00:00Added an answer on May 23, 2026 at 7:46 pm

    It sounds like you want “point free” style code for \a b c -> a + b + c. Let it be known that, in general, \a b c -> a + b + c is often preferable to point free code because it is much easier to read four weeks later when you found a bug.

    There is a wiki article on point free programming (source).

    You can also install the pointfree package, which lets you solve these problems on the command line. For example,

    $ pointfree '\x y z -> x + y + z'
    ((+) .) . (+)
    

    So ((+) .) . (+) is the point free version (x, y, and z are the “points”, in case you were wondering, and no, this has nothing to do with geometry). You can use that definition if you’d like, but most people will look at your code and will have no idea what that funny looking piece of ASCII art is supposed to do. Half of them will work it out with pencil and paper, but isn’t the original \x y z -> x + y + z so much easier on the eyes?

    Hint: If you ever need to figure out what some point free code does, look at the type:

    Prelude> :t ((+) .) . (+)
    ((+) .) . (+) :: (Num a) => a -> a -> a -> a
    

    Or you can install the pointful package, which is approximately the inverse of pointfree.

    Summary: Welcome to the world of points free programming, proceed with caution lest your code be unreadable.

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

Sidebar

Related Questions

I want to do this so that I can say something like, svn mv
Say I'd like to implement something like this: def serialize( list: List[_] ) :
I'm curious if a single SQL statement can do something like this? I have
Let's say that you are limited to use only this syntax (you can't use
In the Modern Objective-C runtime, you can do something like this: @interface MyClass :
Is there a way I can write the output of WPF say a canvas
In Winforms you can say if ( DesignMode ) { // Do something that
Can PHP dissect its own syntax? For example, I'd like to write a function
I have WPF application and a window in it. Lets have something like this
Let's say you have a string that looks like this: token1 token2 tok3 And

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.