Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8956021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T14:41:31+00:00 2026-06-15T14:41:31+00:00

In category theory functor is a homomorphism between two categories. In Haskell, it’s said

  • 0

In category theory functor is a homomorphism between two categories. In Haskell, it’s said that applicative functor allows us to apply functions “inside a functor”. Could one translate that words “function inside a functor” back to mathematics or give some other insight? (I know that functor can be Maybe, [] etc. but still struggle to comprehend that notion.)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T14:41:32+00:00Added an answer on June 15, 2026 at 2:41 pm

    My category theory is not strong at all (I started from the programming side of Haskell and have been recently trying to learn some of the category theory foundations of some of its concepts). But here’s what I’ve got:

    In Haskell, a functor is a type constructor, meaning it maps from general types to “types in the functor”.

    In category theory, a functor maps from the objects of one category to the objects of another category.

    When applying category theory to Haskell, we imagine that we’re working with the category Hask, the category of Haskell types.

    So Haskell functors aren’t general category theory functors; they all map from Hask to a sub-category of Hask (because the type f a for some functor f and arbitrary type a is still a Haskell type). For example the Maybe functor maps objects (types) in Hask to the category of types of the form Maybe a.

    Functions are first-class in Haskell, so function types are perfectly ordinary types (and are objects of Hask) so functors also map function types to “function types in the functor”. So the phrase “a function inside a functor” is a shorthand for a value in a type that results from applying a functor to a function type. e.g. Just (+1) is one particular value in the type Maybe (Int -> Int), which is the object (type) to which the Maybe functor maps the object Int -> Int.

    So an “applicative functor” is a functor which has some extra rules, which are sufficient to take values which are functions in types which are objects of the functor’s “destination” category, and apply those values to other values in types in the destination category.

    Using Maybe again as an example, if we only knew it was a functor that gives us a correspondence between the objects Int -> Char and Maybe (Int -> Char), and between the objects Int and Maybe Int, and between the objects Char and Maybe Char. But while we have the ability to take a value in Int -> Char and a value in Int and produce a value in Char, Maybe being a functor doesn’t guarantee that we have any ability to do some corresponding operation with a value in Maybe (Int -> Char) and a value in Maybe Int.

    When we also know it’s an applicative functor, then we do have an ability to take a value in Maybe (Int -> Char) and a value in Maybe Int and produce a value in Maybe Char, and this satisfies certain properties wrt the application of Int -> Char values to Int values.

    As far as I know, applicative functors aren’t terribly interesting from a pure category theory standpoint. Perhaps this is because category theory is concerned with relationships between objects, which correspond to types in Haskell, but from a programming perspective applicative functors are motivated by relationships between values in those types? (we want the values in the “function types” obtained by using the functor to still be able to be applied to things to do computation).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just reading through category theory book , and decided to apply it to haskell.
I'm looking at http://hseeberger.wordpress.com/2010/11/25/introduction-to-category-theory-in-scala/ and there's a bit of code that I can't understand
I am perusing the online book Computational Category Theory http://www.cs.man.ac.uk/~david/categories/book/book.pdf and I am having
I have a category/file tree structure. Both categories and files can have parents, so
I have a category system that is related many-to-many with posts. How can I
foreach(var category in categories) { a.AddRange(_db.Articles.Where(c => c.Categories.Contains(category))); } The code runs fine, yet
I have a category class that I want to Use that acts on a
I have a browse category query that im trying to optimize. Im ending up
As evidenced by the Typeclassopedia, the current stack of classes imported from category theory
I've been reading about monads in category theory. One definition of monads uses a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.