Friday, December 19, 2008

A small peeve

Whenever I write a function with an external wrapper and an internal recursive function (say, to add an accumulator), I can never come up with a name for the internal function that I find satisfying. This is totally picking nits, but it bugs me for all the recursive calls to be to foo/aux or foo/helper or something like that. Come to think of it, somehow the prime symbol in Haskell and ML feels more natural.

48 comments:

Unknown said...

OTOH efficient implementation of optional parameters (I don't know how efficient mzscheme is) should allow you to use one name for both versions (and even allow different accumulator seeds when needed)

Dave Herman said...

An optional argument isn't always the right solution. In one case I have a function that needs to transform its argument in a particular way only once at the beginning; an extra boolean flag indicating whether this had been done yet would be overkill.

Robert said...

I usually use underscore as the name for these functions.

Anonymous said...

I like using gerunds for this. Like the internal loop for the 'mung' function is 'munging'.

Dan Villiom Podlaski Christiansen said...

I generally use ‘visit’ for that purpose; it's nice and functional, and clearly conveys the intent of the function. To me, it seems as natural as naming an accumulator ‘acc’ and a continuation ‘c’; I wouldn't use the names for anything else.

Mitch Wand said...

Dan usually writes foo^ as the nearest Scheme equivalent to foo' .

I've also used foo-loop or foo-inner.

Interesting how the smallest things get the most comments :-)

grant rettke said...

If you think of those internals as private, foo/private makes sense.

If you are using PLT's module system, then name the public functions foo/public and rename them on export. You can keep your code looking how you want privately and publicly.

Mike Machenry said...

Oh I relate to this a lot. The same issue also often exists with the argument to the external and internal function.

I've gone through a lot of phases in my life. Currently I've been doing _foo. It used to be just aux, before that: foo-aux, and others. I could never settle.

Actually I very often just write let-loop to avoid the naming issue. Then there was the most misguided of all, utilizing the fact that internal definitions shadow the external function.

-mike

Andrey Fedorov said...

The Seasoned Schemer uses upper-case one-letter names, which helps remind you that the function is very local.

This seemed weird at first, but seems to be working out.

Norton Setup said...

Thanks for Sharing. I am glad to know that I follow your blogs. it was very interesting. keep posting!

Install Norton Antivirus in your PC's and mobile to protect your systems from viruses.

norton setup with key
enter norton product key code to activate
Norton setup
norton.com/setup
www.norton.com/setup
norton setup enter product key

norton.com/setup said...

I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.

norton.com/setup

norton.com/setup

norton.com/setup

office.com/setup

roadrunner email

mcafee.com/activate

aol mail

mark watson said...

Really great article, Glad to read the article. It is very informative for us. Thanks for posting.

norton.com/setup
mcafee.com/activate

malina smith said...


Norton™ provides industry-leading antivirus and security software for your PC, Mac, and mobile devices Visit @: - McAfee.com/activate | Norton.com/myaccount | norton.com/setup

Ela Smith said...

After visiting office.com/setup login to microsoft account to take steps sticking together of covenant of office setup, Any complexity in office.com/setup our accomplished will calm for office install.
http://officecomoffiice.com

Ela Smith said...

Get all Steps for installation and download, activate MS office setup. Enter your Office product key on office.com/setup.
http://office-comofficecom.com

Ela Smith said...

norton.com/setup to install setup product key, Learn how to download, install, and put into outfill Norton Setup concerning speaking the subject of your Windows and Mac device.
http://norton-comnortonnorton.com

malina smith said...

Really great article, Glad to read the article. It is very informative for us. Thanks for posting.Norton™ provides industry-leading antivirus and security software
for your PC, Mca, and mobile devices Visit @: - McAfee.com/activate | Norton.com/myaccount | norton.com/setup

antivirusnorton said...

Enter Key Norton Setup, after purchasing Norton from visit norton.com/setup, sign in to your Norton account then enter product key for Norton Install.

norton setup |
mcafee.com/activate |
office.com/setup |

Patta Chitta said...

pattachitta

officecom-officeoffice said...

I'm looking for some good blog sites for Office.com/setup. I was searching for search engines and found your blog site. Keep doing it .To install MS Office, make certain that you have a fine internet connection.
http://officecom-officeoffice.com

officecom-officeoffice said...

Log in to your Microsoft account using the login accreditations and after that type a veritable Office.com/setup key.
http://office-comofficeoffice.com/

officecom-officeoffice said...

You can furthermore download the same product in the middle of insinuation to the subject of new devices by selecting Send a Download Link Norton.com/setup. After the successful activation of your product.
http://nor-norton.com/setup/

Edward Lewis said...

This was a great post. what you said is really helpful to me and it was really interesting as well.
office.com/setup
www.norton.com/setup

Lucia Mandela said...


I like the helpful info you provide in your articles. I’ll bookmark your blog and check again here regularly. I am quite certain I’ll learn plenty of new stuff right here! Good luck for the next!

office.com/setup

Deam jones said...

Norton Security Deluxe is new applications that have all the qualities of Norton antivirus with some extra services.
norton.com/setup
office.com/setup
office.com/setup
norton.com/setup
norton.com/setup
norton.com/setup

waston said...

If your purchase of ms-office.com/setup came with a product key, you enter your product key on one of the websites listed below for your version of Office. After you enter your key, you can download and install Office, or you can renew your Office 365 subscription. office.com/setup ||
www.office.com/setup||
www.office.com/setup

norton.com/setup said...

I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.

norton.com/setup

norton.com/setup

norton.com/setup

kaspersky activation code

free pogo games

roadrunner email

aol mail

www.office.com/setup said...

Office setup is a brand that needs no introduction whether you operate as a working professional in the corporate world, or a school student or operate through a remote
workstation, there is no way for you to not have heard the name. Get your hands on office.com/setup by searching www.office.com/setup on your browser.
www.office.com/setup
office setup

office.com/setup said...


office setup is the software setup file with this setup file you can install on your PC and some of the supported device to make use of office setup. Not only the
office.com/setup but all the software for all time has the setup file, and it is very significant, without the setup file the software turn ineffective
office setup
www.office.com/setup

norton setup said...

Get the easiest way of setup and install Norton Setup with Product Key from norton.com/setup. Norton proves to be one important aspects for all theinternet users to act as a shield against the increasing number of viruses, worms, spyware, and Trojan horses.
norton setup

norton.com/setup said...

I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.

norton.com/setup

norton.com/setup

mcafee.com/activate

kaspersky activation code

free pogo games

roadrunner email

aol mail

Adam Jon said...

Microsoft Office setup is a must tool for any PC in this generation. It provide very userful tools like MS-Word, Excel and powerpoint which are essential for making your task very easy related to business. This feature makes Office.com/setup one of the best software package.

Office.com/setup
Webroot.com/safe

os4aol said...

Loaded with all these astounding highlights and functionalities, would prefer you not to download and introduce this Aol desktop gold Download . Basically pursue the underneath referenced strides to realize how to download and introduce or uninstall this product. Before that you should verify that your PC meets the framework necessities or not.

Bitdefender Login said...

Nice information thanks for sharing me.
mcafee.com/activate | my.avast.com | TomTom Home | BT Mail

Bitdefender Login said...

Good post thanks For sharing us.
Bitdefender login | Garmin Login | office.com/setup | turbotax login

Bitdefender Login said...

Nice post thanks for sharing me.
Camps.intuit.com | Garmin Express

Maria Garcia said...

I am very thankfull to you for sharing this fantastic article , I appereciate your work .

mcafee.com/activate , mcafee.com/activate , mcafee.com/activate

Mike Jones said...

It read your article every thing is clear , Thanks for sharing.

office.com/setup , mcafee.com/activate

whatsapp plus apk said...

123movies

Mark William said...

Kaspersky is an antivirus software designed in kaspersky download. It offers real-time protection, removal, and detection of viruses and malwares. On creating the kaspersky login account, you can download kaspersky antivirus on your device. The Kaspersky was basically designed to protect the device from malwares. The automatic backup, online identity protection, and costless technical support is available for kaspersky.com/downloads users. However, to cover all the devices with protection shield, www.kaspersky.com/downloads is essential. It is compatible with windows, mac, and mobile phones, including iOS and Android.

lily grace said...

AVG has created a complete solution for users to save data through avg retail , which is AVG internet security. Malware and internet threats only do not affect your computer or device, but it is affecting your personal data as well. Using webcam spying and ransomware, hackers can easily steal your personal files, photos, videos, and any of your personal data.
install avg with license number
AVG antivirus is the security program that works after it’s activation with avg retail. It requires an activation product key to activate AVG’s working and to protect your operating system. www.avg.com/retail | avg.com/retail
avg download |
www.avg.com/activation |
www.avg.com/activate

robertwilson said...

Nuance software powers a lot of speech recognition applications, including Siri and Apple Dictation I believe, and I think they have a pretty solid product.
dragon naturally speaking | dragon naturallyspeaking
nuance dragon | nuance dragon naturallyspeaking
naturally speaking

elibeth3636 said...

AVG has offered various products according to the user’s needs. Some of them are AVG internet security, AVG Secure VPN, AVG TuneUp, AVG Ultimate, and others.
www.avg.com/retail |
avg.com/retail

norton.com/setup said...


I am very glad after reading your fantastic article , Thanks for sharing .

norton.com/setup

www.office.com/setup said...



Thank you for sharing excellent information. Your website is so cool. I am impressed by the details that you have on this website. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for extra articles. You, my friend, ROCK! I found simply the info I already searched everywhere and simply could not come across. What a great website. Visit@:-
office.com/setup

norton.com/setup

office.com/setup said...

yeah it is good that it should be written on external wrapper with the name of external through which they can get satisfy

mcafee activate said...

really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.


office.com/setup
www.office.com/setup
office setup
mcafee.com/activate
www.mcafee.com/activate
bitcoin login
bitcoin login

mcafee/activate said...

I really happy found this website eventually. Really informative and inoperative, Thanks for the post and effort! Please keep sharing more such blog.


office.com/setup
www.office.com/setup
office setup
mcafee.com/activate
www.mcafee.com/activate
bitcoin login
bitcoin login