advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
The usefulness of the lambda library is manifested by the fact that it was used for implementing other TR1 libraries. However, such interdependencies among new libraries make learning one library at a time more difficult. In your opinion, is this an acceptable tradeoff or would you rather make changes to core C++ to facilitate the implementation of lambda constructs? Let us know in our C++ Forum.
Partners & Affiliates
advertisement
advertisement
advertisement
Rate this item | 0 users have rated this item.
 

Creating Unnamed Functions with the Lambda Library

Defining an unnamed function directly on the call site of an algorithm can be very useful but is it even possible? Yes it is! Find out how using lambda expressions can simplify your use of STL algorithms. 


advertisement
A lambda expression enables you to define an unnamed function—directly on the call site of an algorithm. Such unnamed functions are chiefly useful in functional programming, generic libraries, and scientific applications. However, even mainstream C++ applications can benefit from the higher-order programming concepts of lambda abstractions. The following sections show how TR1's lambda library can simplify the usage of STL algorithms.


How can you create small, unnamed functions directly on the call site of an STL algorithm?


Use the lambda library for implementing lambda functors.

  Next Page: Presenting the Problem
Page 1: IntroductionPage 3: Creating a Lambda Expression
Page 2: Presenting the ProblemPage 4: Lambda by Numbers
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Help  |   Site Map  |   Network Map  |   About


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers