Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 29.986.124 Times

Iterator 0.03

  Date Added: July 11, 2010  |  Visits: 603


Report Broken Link
Printer Friendly Version

Product Homepage
Download (70 downloads)

Iterator is a general-purpose iterator class. SYNOPSIS use Iterator; # Making your own iterators from scratch: $iterator = Iterator->new ( sub { code } ); # Accessing an iterators values in turn: $next_value = $iterator->value(); # Is the iterator out of values? $boolean = $iterator->is_exhausted(); $boolean = $iterator->isnt_exhausted(); # Within {code}, above: Iterator::is_done(); # to signal end of sequence. This module is meant to be the definitive implementation of iterators, as popularized by Mark Jason Dominuss lectures and recent book (Higher Order Perl, Morgan Kauffman, 2005). An "iterator" is an object, represented as a code block that generates the "next value" of a sequence, and generally implemented as a closure. When you need a value to operate on, you pull it from the iterator. If it depends on other iterators, it pulls values from them when it needs to. Iterators can be chained together (see Iterator::Util for functions that help you do just that), queueing up work to be done but not actually doing it until a value is needed at the front end of the chain. At that time, one data value is pulled through the chain. Contrast this with ordinary array processing, where you load or compute all of the input values at once, then loop over them in memory. Its analogous to the difference between looping over a file one line at a time, and reading the entire file into an array of lines before operating on it. provides a class that simplifies creation and use of these iterator objects. Other Iterator:: modules (see "SEE ALSO") provide many general-purpose and special-purpose iterator functions. Some iterators are infinite (that is, they generate infinite sequences), and some are finite. When the end of a finite sequence is reached, the iterator code block should throw an exception of the type Iterator::X::Am_Now_Exhausted; this is usually done via the "is_done" function.. This will signal the Iterator class to mark the object as exhausted. The "is_exhausted" method will then return true, and the "isnt_exhausted" method will return false. Any further calls to the "value" method will throw an exception of the type Iterator::X::Exhausted. Note that in many, many cases, you will not need to explicitly create an iterator; there are plenty of iterator generation and manipulation functions in the other associated modules. You can just plug them together like building blocks..

Requirements: No special requirements
Platforms: Linux
Keyword: Exhausted General-purpose Iterator Iterators Libraries Programming Value Values
Users rating: 0/10

License: Freeware Size: 22.53 KB
Libraries  -  AppleMods 1.0
The AppleMods project consists of AppleMods Loader, an easy-to-use module management system for AppleScript, and a range of general-purpose modules (or libraries) for working with lists, dates, files, and so on.
132.94 KB  
Libraries  -  Classeine::Sdk
Classeine::Sdk project is a set of general purpose class libraries written in C++ for NetBSD..
51.2 KB  
File Management  -  General purpose file iterator class 1.0
This script presents a general purpose file object iterator cum file object proxy class.It provides a class that gives several iterator functions to read a text file by characters, words, lines, paragraphs or blocks. It also acts as a proxy for...
Programming  -  The Objective Caml 3.08.4
Caml is a general-purpose programming language, designed with program safety and reliability in mind. It is very expressive, yet easy to learn and use. Caml supports functional, imperative, and object-oriented programming styles. It has been...
2.3 MB  
Programming  -  Seed7 2007-08-07
Seed7 is a general purpose programming language designed by Thomas Mertes. Seed7 project is a higher level language compared to Ada, C/C++ and Java. The Seed7 interpreter and the example programs are open-source software. An open-source Seed7...
788.48 KB  
Libraries  -  APL 0.1.8
APL project is a general purpose C++ template class library. All the code is placed in header files, so no compilation is required. You just have to #include the header file. The classes are implemented using Policy Based Design. When you use...
512 KB  
Code Management Tools  -  Bison 2.3
Bison project is a general-purpose parser generator that converts a grammar description for an LALR context-free grammar into a C program to parse that grammar. Once you are proficient with Bison, you can use it to develop a wide range of...
1.3 MB  
Libraries  -  LibTMCG 1.1.1
LibTMCG is a general purpose C++ library for creating secure electronic card games. The most remarkable feature is the absence of a trusted third party (TTP), i.e. neither a central game server nor trusted hardware components are necessary. To...
645.12 KB  
Libraries  -  Libgcrypt 1.2.3
Libgcrypt is a general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptograhic building blocks: symmetric ciphers (AES, DES, Blowfish, CAST5, Twofish, Arcfour) hash algorithms (MD4, MD5,...
983.04 KB  
Libraries  -  libacpi 0.2
libacpi project is a general purpose shared library for programs gathering ACPI data on Linux..
100.35 KB  
Programming  -  FLEX-db Digital Asset Manager 3.0.9
FLEX-db - an enterprise Digital Asset Manager (DAM). It ingests and links metadata with files, creates thumbnails, and processes files using business rules. FLEX-db has a JSP client, Java app server for file input and output and an EJB metadata...
21.57 MB  
Programming  -  Libicom 0.9.0
The libicom library is a character based dynamicly linked library for Linux. It is used to remotely control the Icom IC-R8500 wide band receiver via an RS232 link. All call and return parameters to the control functions are character string based....
20.48 KB  
Programming  -  dotdesktop 0.3
Dotdesktop library provides ability to parse desktop entry file and access the information in a convenient way. Desktop entry file format is defined by, it is used to describe information about an application such as the name and...
327.68 KB  
Programming  -  Cedalion for Linux 0.2.6
Cedalion is a programming language that allows its users to add new abstractions and define (and use) internal DSLs. Its innovation is in the fact that it uses projectional editing to allow the new abstractions to have no syntactic limitations.
471.04 KB  
Programming  -  libyasl 0.2
Libyasl is a C++ class library to easily realize TCP/UDP/Multicast clientsand servers in IPv4 and IPv6 environments under GNU/Linux systems.
143.36 KB  
Libraries  -  wolfSSL 3.12.0
The wolfSSL embedded SSL/TLS library is a lightweight SSL library written in ANSI standard C and targeted for embedded and RTOS environments - primarily because of its small size, speed, and feature set. It is commonly used in standard operating...
2.73 MB  
Libraries  -  EuGTK 4.8.9
Makes it easy to develop good- looking, fast, cross-platform programs that run on Linux, OS X, and Windows. Euphoria is a very fast interpreted/compiled language with straight-forward syntax. EuGTK allows programming in a clean, object-oriented...
10.68 MB  
Libraries  -  Linux User Group Library Manager 1.0
The LUG Library Manager is a project to help Linux User Groups start their own library. A LUG library is helpful to the community at large because it increases access to information, and gives everyone the opportunity to become more knowledgeable.
5.35 KB  
Libraries  -  Module::MakefilePL::Parse 0.12
Module::MakefilePL::Parse is a Perl module to parse required modules from Makefile.PL. SYNOPSIS use Module::MakefilePL::Parse; open $fh, Makefile.PL; $parser = Module::MakefilePL::Parse->new( join("", ) ); $info = $parser->required;...
8.19 KB  
Libraries  -  sqlpp 0.06
sqlpp Perl package is a SQL preprocessor. sqlpp is a conventional cpp-alike preprocessor taught to understand SQL ( PgSQL, in particular) syntax specificities. In addition to the standard #define/#ifdef/#else/#endif cohort, provides also...
10.24 KB