First-Class Function is Homomorphism

Math Online Tom Circle

We know a Program is a math procedure. 

“A Program without Math is like Sex without Love.”

Do you know in Programming a First-Class Function is a Homomorphism in Abstract Algebra ?

In Functional / Dynamic Programming Language like Lisp, it supports First-Class Function.

Eg.
Map (sqr {1 2 5 4 7})
=> {1 4 25 16 49} 

A First-Class Function like ‘Map’ is a Function call which  accepts  another function ‘sqr’ as argument.

Map means “Apply to All”.
Map applies ‘sqr’ to all members of the list  {1 2 5 4 7}.

In abstract algebra, Map (eg. Linear Map) is a homomorphism !

http://en.m.wikipedia.org/wiki/Map_(higher-order_function)

View original post

Advertisements

About tomcircle

Math amateur
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s