d9 $ midicmd "start" # s "midi" let melody = slow 6 $ "0 2 [4 8 .] [3 4 3] 8 4 9" generateMelodicSeed = slow 4 $ linger 0.5 $ repeatCycles 3 -- $ palindrome \n $ (+ (slow (irand (4)+1) (sometimes (inversion) (run (irand (4)+1))))) $ slow ((irand 3) + 1) $ e ("x"<~>(irand 8)) 8 $ "x*16"<~>(irand 5) d3 $ note ((scaleP scalePattern $ (rotR 4) $ (+ slow 8 "x" <~> ((0.25 ~>) generateMelodicSeed)) -- $ slow 4 \n $ generateMelodicSeed ))#s "[pe-gtr:8,midi]" #gain 1.2 #orbit 2 #midichan 3

Functional Programming

Functional Programming is a paradigm for software design. It favors implementing functionality by composition of pure function and demands that side effects be strictly separated from pure functional code.

This pure code has Referential Transparency and it is possible to reason about its behavior mathematically.

common features

The following are generally common to functional design. However, not all languages have built in support for these concepts. Trying to keep code pure can be puzzling as a computer program is inherently useless until it produces some tangible side effect. The following language features generally make this puzzle easier to solve.

-Closures -Partial Application -Lazy Evaluation


Notes mentioning this note



Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.