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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:06:31+00:00 2026-05-17T00:06:31+00:00

I am trying to name what I think is a new idea for a

  • 0

I am trying to name what I think is a new idea for a higher-order function. I want to call it a BinaryProjection, but my compatriot wants to call it the Plow. We tossed around the idea of a Snow Blower for a minute, too. Anyway, to the important part, here is the code in Python and Haskell to demonstrate the concept, which will be explained afterward.

Python:

>>> def plow(f, l):
       return map(lambda t: f(*t), zip(l, l[1:]))
>>> plow(operator.add, [0, 1, 2, 3])
[1, 3, 5]

Haskell:

Prelude> let binaryProjection f xs = zipWith f xs (drop 1 xs)
Prelude> binaryProjection (+) [0,1,2,3]
[1,3,5]

As you may be able to infer, the sequence is being iterated through, utilizing adjacent elements as the parameters for the function you pass it, projecting the results into a new sequence. So, has anyone seen the functionality we’ve created? Is this familiar at all to those in the functional community? If not, what do we name it?

---- Update ----

There are three candidates for the name. meld, pinch, and pleat. In Haskell, they would be implemented as so (using "meld"):

Prelude> let meld xs = zip xs (drop 1 xs)
Prelude> meld [1..4]
[(1,2),(2,3),(3,4)]

Prelude> let meldWith f xs = zipWith f xs (drop 1 xs)
Prelude> meldWith (+) [1..4]
[3,5,7]

I think it’s time for a vote. I’m partial to pinch or pleat, myself.

  • 1 1 Answer
  • 2 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-17T00:06:32+00:00Added an answer on May 17, 2026 at 12:06 am

    I really can’t see any codified names for this anywhere in Python, that’s for sure. “Merge” is good but spoken for in a variety of other contexts. “Plow” tends to be unused and supplies a great visual of pushing steadily through a line of soil. Maybe I’ve just spent too much time gardening.

    I also expanded the principle to allow functions that receive any number of parameters.

    You might also consider: Pleat. It describes well the way you’re taking a list (like a long strand of fabric) and bunching segments of it together.

    import operator
    
    def stagger(l, w):
        if len(l)>=w:
            return [tuple(l[0:w])]+stagger(l[1:], w)
        return []
    
    def pleat(f, l, w=2):
        return map(lambda p: f(*p), stagger(l, w))
    
    print pleat(operator.add, range(10))
    print pleat(lambda x, y, z: x*y/z, range(3, 13), 3)
    print pleat(lambda x: "~%s~"%(x), range(10), 1)
    print pleat(lambda a, b, x, y: a+b==x+y, [3, 2, 4, 1, 5, 0, 9, 9, 0], 4)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to think of the name of the plugin (or a plugin)
I just want to know why this doesn't work (I am trying to name
I am trying to display name object, but its not working. I seem to
I am new to asp.net MVC and razor, but I'm trying to build a
I am trying to do something like this: property = 'name' value = Thing()
When creating database tables I'm often stumped when trying to name my time/date/timestamp fields.
I am trying retrieve user name from the code through graph api, the below
I have two tables as shown here . I am trying to fetch name
Trying to find a good name for a method swapping each coordinate X and
Im trying to get the name of a user by looking in up with

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.