Functional programming -- 2009-2010 -- info.uvt.ro/Laboratory/Notes 4
Appearance
Covered topics
[edit]- high order functions (functions treated as usual values);
- function calls with
apply
orfuncall
; - function composition;
- lambda (functions created as usual values);
- classic list operations using lambda's;
- closures;
- currying;
Examples
[edit]High order functions
[edit]...
Function composition
[edit]...
Lambda
[edit]...
Currying
[edit]...
Exercises
[edit]...
References
[edit]Reading
[edit]...
API
[edit]- lambda
For Scheme:
- Section 2.2.7., Anonymous Functions with lambda, 4.4 Functions (Procedures): lambda (from Guide: PLT Scheme);
- Section 2.8., Procedure Expressions: lambda and case-lambda (from Reference: PLT Scheme);
For Common Lisp:
- ...
- apply, funcall, compose
For Scheme:
- Section 4.3.3., The apply Function (from Guide: PLT Scheme);
- Section 3.16., Procedures (from Reference: PLT Scheme), and look at the beginning for
apply
, andcompose
;
For Common Lisp:
- ...
map and friends
For Scheme:
- Section 3.9., Pairs and Lists (from Reference: PLT Scheme), and look for:
map
,andmap
,ormap
,foldl
,foldr
,filter
,remove
;
For Common Lisp:
- ...