d4 -- $rev \n$ note ((scaleP scalePattern -- $off 4 ((+ 2 ).slow 2) \n --$ off 1 (inversion.slow 2) \n $(rotR 1.5 )$(+ slow 8 "x" <~> generateMelodicSeed) -- $inversion \n$ generateMelodicSeed ))#s "[pe-gtr:12,midi]" #gain 1.2 #orbit 3 #midichan 4   do d9 $midicmd "stop" # s "midi" hush   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)   d9 \$ midicmd "start" # s "midi" 

# 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.