Language::Functional

Language::Functional is a Perl module which makes Perl slightly more functional.
Download

Language::Functional Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Leon Brocard
  • Publisher web site:
  • http://search.cpan.org/~lbrocard/

Language::Functional Tags


Language::Functional Description

Language::Functional is a Perl module which makes Perl slightly more functional. Language::Functional is a Perl module which makes Perl slightly more functional.SYNOPSIS use Language::Functional ':all'; print 'The first ten primes are: ', show(take(10, filter { prime(shift) } integers)), "n";Perl already contains some functional-like functions, such as map and grep. The purpose of this module is to add other functional-like functions to Perl, such as foldl and foldr, as well as the use of infinite lists.Think as to how you would express the first ten prime numbers in a simple way in your favourite programming language? So the example in the synopsis is a killer app, if you will (until I think up a better one.The idea is mostly based on Haskell, from which most of the functions are taken. There are a couple of major omissions: currying and types. Lists (and tuples) are simply Perl list references, none of this 'cons' business, and strings are simple strings, not lists of characters.The idea is to make Perl slightly more functional, rather than completely replace it. Hence, this slots in very well with whatever else your program may be doing, and is very Perl-ish. Other modules are expected to try a much more functional approach. Requirements: · Perl


Language::Functional Related Software