Language::FP

Language::FP is an implementation of John Backus' FP language.
Download

Language::FP Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sean O'Rourke
  • Publisher web site:
  • http://search.cpan.org/~seano/WWW-Facebook-FQL-0.03/FQL.pm

Language::FP Tags


Language::FP Description

Language::FP is an implementation of John Backus' FP language. Language::FP is an implementation of John Backus' FP language, a purely functional language remarkable for its lack of named variables -- only functions have names.SYNOPSIS use Language::FP qw/perl2fp/; # Sum of the first 12 integers: my $sum = fp_eval '/+ . iota:12' print perl2fp($result); # prints '< 78 >' # Matrix-vector product: fp_eval 'def Ax = @(+ . @* . trans) . distr'; my @mv = (, ], ); print perl2fp(fp_eval('Ax:' . perl2fp(@mv))); # prints '< 17 39 >' # Cross-language calls: print join ', ', Ax(@mv); # prints '17, 39' sub cubes { map { $_ ** 3 } @_ } print perl2fp(fp_eval 'cubes:< 1 2 3 >'); # prints '< 1 8 27 >' fp_eval in => *INPUT, out => *OUTPUT;Note that this is not a deliberately obfuscated language -- it was designed for actual users (probably mathematicians). Since Perl's $calars, @rrays and %ashes advertise themselves so boldly, I thought programming in a language whose author thought that named variables led only to confusion and error would be eye-opening. I now know why every language since has had named variables.While at some point I should probably include a brief FP tutorial, for the moment please see http://www.cse.sc.edu/~bays/FPlink for more information on the language's history and basic functions. There are a number of subtle syntactic variants of FP described and implemented on the web. This unfortunate state of affairs is due at least in part to the original language's use of non-ASCII characters. This package uses a hybrid chosen to be somewhat: (1) legible, (2) faithful to the original, and (3) predictable to those familiar with Perl.Requirements:· Perl Requirements: · Perl


Language::FP Related Software