Page 3 of 11

 

  Previous Page Table Of ContentsNext Page
Table of Contents

• Introduction
•  Starting point
  Major FP design patterns/functions in XSLT
• List processing
• Tree processing
• Lazy evaluation
• Advanced XSLT FP applications
• Square root
• Numerical differentiation
• Numerical integration
• Summary


The Functional Programming Language XSLT - A proof through examples

Major FP design patterns/functions in XSLT

In this section we provide the XSLT implementation of many of the functions defined in John Hughes paper "Why functional programming matters" [1]. We provide numerous implementations of list-processing functions, and of a very generic tree-folding function and other functions that are based on it. We also demonstrate how lazy evaluation can be simulated in XSLT.

Implemented Functions

The following table contains the names of all functions (in chronological order), whose XSLT implementation are provided as part of this article.

foldl

foldr

sum

product

sometrue

alltrue

minimum

maximum

append

map

doubleall

sumproducts

foldl-tree

sumTree

productTree

tree-labels-list

mapTree

buildListWhile

buildListUntil

take

takeWhile

drop

dropWhile

splitAt

span

partition

within

sqrt

buildListWhileMap

easyDiffList

elimError

improve

improvedDiff

partialSumsList

improvedIntegration

 

 

Page 3 of 11

 

Previous Page Table Of ContentsNext Page

SourceForge.net Logo