Functor Anatomy of Haskell abstract concept

Source: Internet
Author: User

Before understanding functor, it is necessary to understand the category theory of abstract algebra, the knowledge of category theory as the foreshadowing, the feeling functor is not so difficult to understand.


A category C includes:

      •   an object-composed class Ob (C)

      •   objects. Each State shot F has a "source object" A and "target object" B, and both A and B are within OB (C). It is therefore written as f:a B, and the F is a state shot from a to B. A "state shot" of all A-to-b states, labeled Hom (b) or HOMC (A, B).

      •   to three objects A, B and C, two Hom (A, A, a) * Hom (B,c), Hom (A,c) is called a state-injection compound; the composition of f:a-B and G:b-C is written as G. F or GF.

This state-injection composite satisfies the following axioms:

      • (unit) for any object x, there is a one-state shot 1x:x, X, so that each state shot F:a-B, there will be 1b.f = f = f.1a. This state is called the unit state shot of X.      

Functor Anatomy of Haskell abstract concept

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.