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

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

Serving Software Downloads in 956 Categories, Downloaded 49.481.589 Times

Iterator 0.03

  Date Added: July 11, 2010  |  Visits: 831

Iterator

Report Broken Link
Printer Friendly Version


Product Homepage
Download (87 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. Iterator.pm 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
USER REVIEWS
More Reviews or Write Review


ITERATOR RELATED
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...
 
Development Tools  -  General Purpose Controller 1.0
This is a general purpose controller that I have built using the Fuzzy Logic Rules. You don't need to have any mathematical background in fuzzy logic to run this model.You don't need to have fuzzy logic toolbox to run it aswell.It contains both...
20.48 KB  
Programming  -  General purpose dynamic array - Judy 1.1 RC1
Judy is a general purpose dynamic array implemented as a C callable library. Judy's speed and memory usage are typically better than other data storage models and improves with very large data sets.
1.09 MB  
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 0.0.3.0-b0004
Classeine::Sdk project is a set of general purpose class libraries written in C++ for NetBSD..
51.2 KB  
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  
NEW DOWNLOADS IN PROGRAMMING, LIBRARIES
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  -  Math::GMPf 0.29
Math::GMPf - perl interface to the GMP library's floating point (mpf) functions.
30.72 KB  
Programming  -  Net::Wire10 1.08
Net::Wire10 is a Pure Perl connector that talks to Sphinx, MySQL and Drizzle servers. Net::Wire10 implements the low-level network protocol, alias the MySQL wire protocol version 10, necessary for talking to one of the aforementioned...
30.72 KB  
Programming  -  logilab-common 0.56.2
a bunch of modules providing low level functionnalities shared among some python projects devel Please note that some of the modules have some extra dependencies. For instance, logilab.common.db will require a db-api 2.0 compliant...
174.08 KB  
Programming  -  OpenSSL for linux 1.0.0a
The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open Source toolkit implementing the Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) protocols as well as a...
3.83 MB  
Libraries  -  wolfSSL 4.0.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...
3.88 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