Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 15 in printed book and digital formats -- plus a one-year subscription so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now



Intro to Fun, Part 2

Towards Functional Programming with Real Studio

Issue: 11.1 (November/December 2012)
Author: Daniel Gross
Article Description: No description available.
Article Length (in bytes): 18,944
Starting Page Number: 24
RBD Number: 11106
Resource File(s): None
Related Link(s): None
Known Limitations: None

Excerpt of article text...


In part one of this two-part article series I illustrated how looping functions, such as the filter [1] and map [2] functions, implemented in the fun functional library, support a functional programming style in Real Studio. I also discussed how a functional coding style helps make code easier to understand, maintain and change. In this article I illustrate two additional functional programming features offered by the fun library, functional composition and closure, and explain why they are needed and the benefits that the features offer.

The next section illustrates how to use functional composition to flexibility and add functionality to already existing code. Section three motivates the need for closure, a key concept in function programming, explains the concept and illustrates its use. Finally, I conclude the article with a discussion describing how function composition and closure was implemented in the fun library.

Functional composition in Real Studio

...End of Excerpt. Please purchase the magazine to read the full article.

Article copyrighted by REALbasic Developer magazine. All rights reserved.




Weblog Commenting and Trackback by HaloScan.com