d9 $ midicmd "start" # s "midi" scalePattern = slow 16 "" d2 $ note ((scaleP scalePattern $ (rotR 3.5) -- $ inversion \n $ (+ slow 8 "x" <~> ((0.5 ~>) generateMelodicSeed)) -- $ slow 2 \n $ generateMelodicSeed ) - 12)#s "[pe-gtr:9,midi]" #gain 1.2 #orbit 1 #midichan 2 let melody = slow 6 $ "0 2 [4 8 .] [3 4 3] 8 4 9"
index > /home/xinniw/Documents/garden/Partial Application.md

Partial Application

:cc0:

Related to closures, Partial application is the idea that, when supplying less than the required number of arguments for a function, it should not create an error, but rather return a closure that "encloses" over the partially applied arguments. This function then would take the missing arguments as its input and call the original function with all the data together. It is not a common feature outside of pure functional languages like Haskell. However, some languages have add on libraries to simulate this effect.

The ability to partially apply functions makes it easier to compose functions together.


index > /home/xinniw/Documents/garden/Partial Application.md