First-Class Function is Homomorphism

tomcircle's avatarMath 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

Unknown's avatar

Author: tomcircle

Math amateur

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.