DRAFT DOCUMENT

# Value

A value is an expression that implies no further processing; a normal form, for example: we can use a numerical value to represent the age of a person.

Swift

# Referentially Transparent

An expression is said to be referentially transparent if it can be replaced with its corresponding value without changing a program’s behavior.

# Predicate

Is any boolean valued function, typically returning either true or false.

# Function

Defines a relation between a set of inputs and a set of outputs, more typically with a formula or algorithm.

# Domain

The input to a function is called the domain

# Codomain

The output from a function is called the codomain, what actually comes out of the function is the range

# Pure Function

Is a function where each input is related to exactly one output. Inversely any function can be memoized is a Pure Function.

# Morphism

Morphisms are basically functions, and in category theory are also called arrows.

# Injective Function

Is also called a one-to-one function is a function that preserves distinctness.

• A monomorphism is generally injective.
• Every injective function can be reversed.
• Never assigns the same codomain value to two different domain elements.
• Never assigns the same value to two different domain elements.

If we consider the square function: $f(x) = x^2$

is not injective if x is both postive and negative. However it is injective if we limit the domain:

• $x \ge 0 : x^2$ values greater than zero.

## Injective graph

Swift

Note: sqrt and pow are both injective functions, each being the inverse of the other.

# Surjective Function

Is also called a one-to-many function having at least one or more match in the output.

# Bijective Function

The combination of Injective and Surjective.

So there is a perfect “one-to-one correspondence” between the members of the sets.

(But don’t get that confused with the term “One-to-One” used to mean injective).

# Injective, Surjective and Bijective

Injective, Surjective and Bijective tells us about how a function behaves.

# Monomorphism

Monomorphisms are a categorical generalization of injective functions (also called “one-to-one functions”); in some categories the notions coincide, but monomorphisms are more general, as in the examples below.

# Homomorphism

If we look at the above variable; it’s clear that age is 23, because of the assignment.

• age is our variable
• 23 is the value that we’ve assigned to this variable

# Applicative Functor

Attention Xennox

This can be used as an example template; I have also placed a copy in the templates folder.

I am providing this example to hopefully make the delineation of the language parts a little easier. Also I provided a few markdown examples within the code blocks; you can find the full github markdown documentation at github.com

Here’s an example of two formatting code:

• C#
• C++

The following tags:

• {::options parse_block_html="true"/}
• {::options parse_block_html="false"/}
• highlight C# linenos
• endhighlight

… are important to separate the different parts precisely; basically which parts are markdown (format) parsed and which parts are kramdown (code) parsed, similarly the spacing before and after the html tags like <div class="C#">, <div class="codefunc-result">45<br>90</div> and </div>

Text explanation preceding the code block

## C# Explanation after the code block

Ensure that all the text that explains the code is included in the code <div>, also make sure you left align everything you want to be parsed as markdown.

• list item 1
• list item 2
• list item 3
table example
1234 apple
5678 pear
9012 banana

In-line code tags int _sum = 23; example

block quote example

• [x] This is a complete item
• [ ] This is an incomplete item

Text explanation preceding the code block

45
90
84848

## C++ Explanation after the code block

Ensure that all the text that explains the code is included in the code <div>, also make sure you left align everything you want to be parsed as markdown.

• list item 1
• list item 2
• list item 3
table example
1234 apple
5678 pear
9012 banana

In-line code tags int _sum = 23; example

block quote example

• [x] This is a complete item
• [ ] This is an incomplete item

Hope this helps to make it a little easier.

Ps. To add another language we only need to modify the post.html languages array; thereafter it will be automatically detected and accommodated in the posts. Currently the array looks like this:

• var languages = ['C#', 'C++', 'Go', 'Haskell', 'Java', 'JavaScript', 'Perl', 'PHP', 'Python', 'Rails', 'Ruby', 'Swift', 'VB.Net'];
The Language Preference Javascript will probably move out of the post.html to a .js file during refactoring; I'll let you know when the location changes.

### Normal Form

• An object is in normal form if it cannot be rewritten any further.