Commits

Anonymous committed aa7bceb

[svn r530] ok

Comments (0)

Files changed (1)

+.TH bashkell 1 "March 5 2010"
+.LO 1
+
+
+.SH NAME
+bashkell \- A bash function library inspired by Haskell.
+
+
+.SH SYNOPSIS
+  source bashkell [-l]
+
+
+.SH DESCRIPTION
+.B baskell
+is a bash function library inspired by Haskell. It provides implementations of the following 
+standard Haskell higher-order functions: 
+\fImap\fP, \fIfilter\fP, \fIfoldl\fP, \fIfoldr\fP, \fIall\fP and \fIany\fP. Implementations for the 
+following standard Haskell functions are also provided:
+\fIsum\fP, \fIproduct\fP, \fImax\fP, \fImin\fP, \fIand\fP, \fIor\fP
+and \fIshow\fP.
+.P
+.B baskell
+also supports lambda expressions that can be used with higher-order functions or to define 
+short (one line) bash functions.
+
+
+.SH OPTIONS
+.TP
+.B \-\^l
+When the 
+.B -l 
+options is used, an implementation of the Haskell \fIlet\fP keyword is provided,
+allowing for short (one line) bash functions to be defined in a style similar to Haskell.
+
+Note: As a side effect of defining a \fIlet\fP function, the bash \fIlet\fP keyword 
+will be masked. Do not use this option if you intend to use the bash \fIlet\fP
+keyword to create variables.
+
+
+.SH HIGHER-ORDER FUNCTIONS
+
+  type INPUT = [String]
+  type OUTPUT = [String]
+  type EXPRESSION = (String ->)* String
+
+  map :: EXPRESSION -> INPUT -> OUTPUT
+  
+  
+
+
+.SH LAMBDA EXPRESSIONS
+All 
+.B bashkell
+functions that accept a 
+
+
+.I COMMAND
+as an argument can also accept 
+.I lambda expressions
+instead. 
+.I Lambda expressions
+are written as in Haskell, i.e. using the following notation:
+
+  \\arg1 ... argn -> COMMAND
+
+For example, instead of the command
+.I dirname
+, one could use the following lambda expression:
+
+  \\f -> dirname $f
+
+.SH FUNCTIONS
+.SS map 
+blablabla
+.SS filter
+.SS foldl/foldr
+
+.SH AUTHOR
+Written by Patrick LeBoutillier <patl@cpan.org>.
+