
n. [數] 函子(起作用的東西);功能詞;[自] 功能元件
Do the functor laws prove complete preservation of structure?
函子的法律證明保存完整的結構嗎?
This type of object is known as a functor or function object.
這種類型的對象稱為functor或者function object。
In order to get the command diagram, a new functor was adopted in the PLS algorithm.
通過引入一種新的算符,給出了PLS算法命令圖。
When you are designing a functor, it is important to understand the lifetime of these functors.
當你設計一個函,重要的是要了解這些函子的壽命。
Curious readers will be wondering what makes a functor different from an anonymous function or closure.
好奇的讀者會想是什麼使仿函數不同于匿名函數或閉包呢?
n.|functional word;[數]函子(起作用的東西);功能詞;[自]功能元件
函子(Functor)是數學和計算機科學中的核心概念,其定義因領域不同而有所差異,但均體現了結構保持和映射的核心思想。
在範疇論中,函子是範疇之間的映射,需滿足以下條件:
例如,從“群範疇”到“集合範疇”的遺忘函子,會忽略群的運算結構,僅保留集合元素。
在函數式編程中,函子指支持map
操作的數據結構。例如在Haskell中,Functor
類型類要求實現fmap
函數,使得對容器内的每個元素應用函數後,容器結構保持不變。代碼示例如下:
fmap (+1) -- 結果為
我将基于知識庫為您解釋"functor"的含義:
"functor" 在不同學科中有不同含義,主要分為兩大領域:
operator()
的類實例std::function
)、Haskell等語言中典型區别:
建議根據上下文判斷具體含義。編程場景多指函數對象,數學/範疇論場景指結構映射。
bring throughcentenarytertiaryplumbwreakglycyrrhizininvadingNavassaresumingswordfishteethingtestamentalCarnegie Hallisoprene rubberLow Countriessituation comedyvisual cortexAepyornithidaeaerotriangulatorbacteriohemagglutininbrakestaffenameledenregimentergokryptinegeohalogenoushangmanimerinitemacrurousmasticator