concept representation in category functional programming

appears as: representation, A representation, The representation, representations, representation, representations
Functional Programming with Kotlin

This is an excerpt from Manning's book Functional Programming with Kotlin.

With that said, the representation doesn’t matter too much. What’s important is that we have a single, general-purpose type, and using this type we can write general-purpose functions for capturing common patterns of stateful programs.

Note that coming to these conclusions didn’t require knowing exactly how fork and get would be implemented, nor even what the representation of Par would be. We just reasoned informally about the sort of information required to actually spawn a parallel task, then examined the consequences of having Par values know about this information.

Functional Programming in Scala

This is an excerpt from Manning's book Functional Programming in Scala.

The representation doesn’t matter too much. What’s important is that we have a single, general-purpose type, and using this type we can write general-purpose functions for capturing common patterns of stateful programs.

Note that coming to these conclusions didn’t require knowing exactly how fork and get will be implemented, or even what the representation of Par will be. We just reasoned informally about the sort of information required to actually spawn a parallel task, and examined the consequences of having Par values know about this information.

At any point while sketching out an API, you can start thinking about possible representations for the abstract types that appear.

Let’s see if we can come up with a representation. We know run needs to execute asynchronous tasks somehow. We could write our own low-level API, but there’s already a class that we can use in the Java Standard Library, java.util.concurrent .ExecutorService. Here is its API, excerpted and transcribed to Scala: