Timothy Boronczyk's Blog: Currying in PHP

Courtesy PHPDeveloper.org  Fri, 07/10/2009 - 12:33

Timothy Boronczyk has posted about an interesting concept you could use in your applications - currying (made possible in PHP 5.3.x and above):

What happens if you don't have all the arguments handy for a function, but you want to give whatever arguments you do have now and then provide the rest of them to the function later?

This is called currying , and is a core concept in functional programming.

It's messy, but possible to...


 

More related items

Ben Waine's Blog: PHP Benelux 2010 Round Up
If you didn't get a chance to make it to this year's PHP Benelux conference, you might want to check out this wrapup from Ben Waine about his experiences and the sessions he's enjoyed most. ...

5.2->5.3 migration script - Stas Malyshev
Wrote an article on DevZone about migration script from php 5.2 to 5.3. This little script can save some time when you consider to move your codebase to run under 5.3 (which you should ....

Tech Tip: Dereference Variable Names Inside Bash...
We often read (including in the book Advanced Bash-Scripting Guide by Mendel Cooper) that if we pass variable names as parameters to functions, they will be treated as string literals and...

Linksys WRT610N Simultaneous Dual-N Band Wireless...
The sleek Simultaneous Dual-N Band WRT610N Router sets a new standard for design, expanded bandwidth, and robust performance. It's the ideal router for all your current and future digital...

1 GB SanDisk MicroSD TransFlash Memory Card (Bulk)
The MicroSD card is based on TransFlash, which was developed by SanDisk in cooperation with Motorola and is the worlds smalles flash memory card form factor.


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com