Got an idea: functions (in FP) could be composed similar was as components in OOP. For components in OOP we use interfaces. For functions we could use delegates. Goal is to achieve decomposition, modularity and interchangeability. We could employ dependency injection to make it easier.
I tried to find something about the topic. No luck. Probably because there are no functional programs big enough to need this ? While searching for enterprise scale applications written in FP I found this list. Functional Programming in the Real World and this paper. I hope I just missed the killer applications for FP, which would be big enough to deserve decomposition.
Question: Could you show decent real-world FP application (preferably opensource), which uses decomposition into modules ?
Bonus chatter: What is the usual pattern used ? What kind of functions are usually decomposed into separate module ? Are the implementations ever mocked for testing purpose ?