Nyob rau hauv lej, tshwj xeeb hauv qeb txoj kev xav, ib qho kev ua haujlwm yog daim ntawv qhia ntawm pawg. Functors tau pom thawj zaug hauv algebraic topology, qhov twg cov khoom algebraic cuam tshuam rau qhov chaw topological, thiab cov duab qhia chaw ntawm cov khoom algebraic no cuam tshuam rau daim duab qhia chaw txuas ntxiv ntawm qhov chaw.
Koj txhais tau li cas rau lub luag haujlwm?
Nyob rau hauv kev ua haujlwm ua haujlwm, lub tshuab ua haujlwm yog tus qauv tsim los ntawm lub ntsiab lus los ntawm qeb kev xav, uas tso cai rau hom generic siv lub luag haujlwm sab hauv yam tsis hloov cov qauv ntawm hom generic. Lub tswv yim no yog encoded hauv Haskell siv hom chav kawm. class Functor f qhov twg fmap:: (a -> b) -> f a -> f b.
Puas yog lub luag haujlwm yog morphism?
Identity functor: nyob rau hauv qeb C, sau 1C los yog idC, maps ib yam khoom rau nws tus kheej thiab morphism rau nws tus kheej. Tus neeg ua haujlwm tus kheej yog tus endofunctor.
Dab tsi yog qhov ua haujlwm ntawm kev hais lus?
Function lo lus hauv lus. Hauv khoos phis tawj programming: Functor (functional programming) Cov khoom siv tau siv los hla cov taw qhia ua haujlwm nrog rau lub xeev cov ntaub ntawv. rau kev siv lo lus hauv Prolog lus, saib Prolog syntax thiab semantics.
Puas yog npe ua haujlwm?
Raws li Haskell tus tsim tawm, txhua yam xws li Daim Ntawv Qhia, Daim Ntawv Qhia, Ntoo, thiab lwm yam yog piv txwv ntawm Haskell Functor.