Dosa by wikipedia user SteveR CC BY 2.0

Functional Programming has been around for quite a while and concepts from it are making their way into more mainstream languages. Partial function application is one example that can be very handy to have in your toolbox.

A big advantage of using partial application is allowing us to take general functions and specialize them at runtime.

Instead of writing special purpose functions, we can reuse general functions. This allows us to have less code, especially if the functions are complicated. It helps our code to be simpler, since using situation specific functions (with fewer arguments and more specific names) makes our code less cluttered and more readable.

Finally, reusing general purpose functions and specializing them by partial application doesn't add new logic which could have bugs.

This guide was first published on Mar 27, 2019. It was last updated on Mar 08, 2024.

This page (Wrap up) was last updated on Mar 08, 2024.

Text editor powered by tinymce.