What is functor?

A functor is like a special kind of bag that carries things from one place to another while keeping their shapes and sizes intact.

Imagine you have a box of crayons in your classroom, and you want to take them to the park. A functor is like a backpack that helps you move those crayons, not just any backpack, but one that makes sure each crayon stays exactly as it was: the red crayon is still red, the blue crayon is still blue. It doesn’t squish or stretch them.

How the Bag Works

When you put your crayons in the functor (backpack), you're doing something called mapping, like giving each crayon a new home without changing it. When you take them out at the park, they’re still the same crayons, just now in a different place.

Think of it like this: the functor is your helper who knows how to move things properly from one room (or world) to another, making sure nothing gets messed up along the way.

Take the quiz →

Examples

  1. A functor is like a moving truck that takes your furniture (objects) and their arrangement (relationships) from one house (category) to another.
  2. Imagine you have a set of toys, and you move them to a new room, keeping how they’re connected together.
  3. Functors help keep things organized when you move between different worlds.

Ask a question

See also

Discussion

Recent activity