Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md
csv_to_xml
csv_to_xml-example.csv
csv_to_xml_short
dbi
definitionlists
diff_to_html
existing_files
fibs
find-maildirs
gen-csv
goto
log-sensors
logic
logwatch
logwatch_exampleconfig.pl
maplines
maplines-example.pl
pdf-to-html
predicates
primes
sendprepare
skip
template

README.md

Check the functional-perl website for properly formatted versions of these documents.


Examples

Some examples showing the possibilities using functional-perl.

  • fibs and primes show translations of Haskell programs.

  • gen-csv and csv_to_xml (and the shorter variant csv_to_xml_short) show how to stream number series into and from CSV files and into XML.

  • diff_to_html hows how to generate (X)HTML.

  • skip shows how to implement a sliding window (look-ahead) as a pure function (that can easily be tested) and then uses it for I/O

  • pdf-to-html is a practical, small and rather clean example reading directories and generating HTML. It also shows how to wrap non-functional Perl builtins (regex matching) in pure functions.

These are really just test suites, but perhaps still instructive:

  • dbi shows/tests usage of FP::DBI

  • predicates shows/tests FP::Predicates

Copy template to create your own script.

See also

  • Htmlgen, the script that generates this website.

  • For a real program using these modules, see ml2json, although it still bundles a much older version of the functional-perl libraries (todo: update to use the current functional-perl instead)