펑터Functor
https://hackers.pub/@lionhairdino/2025/%ED%8E%91%ED%84%B0functor
C++OnSea 2025 SESSION ANNOUNCEMENT: Safe and Readable Code: Monadic Operations in C++23 by @asperamanca
https://cpponsea.uk/2025/session/safe-and-readable-code-monadic-operations-in-cpp23
Register now at https://cpponsea.uk/tickets/
예전 펑터 글에 "펑터 값을 프리미티브한 값처럼 쓰고 싶다"라는 목표를 먼저 세우고, `<$>`와 `<*>`등을 살펴보는 내용을 추가했습니다.
https://lionhairdino.github.io/posts/2023-03-09-functor.html
The playlist "Monads are no Nomads" is gaining momentum, everyone! The playlist is rich with examples in Kotlin and Haskell. Why Haskell? Because Haskel is one of the languages that lays the foundations of pure functional programming. A bizarre word to describe a great concept over here:
#monad #functor #kotlin #haskell #coding
https://youtube.com/playlist?list=PLw1b-aiSLRZhpqdS2lJ9ACithA1HxpuwL&si=Hmj004ohkw9CaRSD
I have added 8 more videos to my playlist "Monads are no Nomads". Have a look at the last one where I talk about composition in Haskell:
Short #categorytheory lesson: There is a common figure of speech, that goes like "If x is like y, then z is like q", e.g. "If a school are like a corporation, then the teachers are like bosses". This figure of speech introduces a #functor: what are you saying is that there is a certain connection (or category-theory therms a "morphism") between schools and teachers, that is similar to the connection between corporations and bosses i.e. that there is some kind of structure preserving map that connects the category of school-related things, to the category of work-related things in which schools (a) are mapped to corporations (F a) and teacher (b) are mapped to bosses (F b). and the connections between schools and teachers (a -> b) are mapped to the connections between corporations and bosses (F a -> F b).
Recall that a #colimit of a #diagram in a #category C, that is, of a #functor F:J→C, is #given by a #universal [[#cocone]] for F. A [[#co #cone]] for F is a #natural #transformation from F to a #constant diagram,
Δ(c)=(J→1→cC),
so that a cocone for F is an #object of a #comma category,
F↓Δ,
where Δ:C1→CJ is the #diagonal functor #obtained by #pulling #back #along the #unique functor J→1. A universal cocone is #simply an #initial object of F↓Δ.
sounds recursive
That aside both list and tree need fmap : (a, b) -> (f(a),f(b))
That's where #functor becomes powerful
One Abstraction to many #datastracture
Also, with kinds you can treat a type just like any other function
Watch "Turing Machines, abstracted in Poly" on YouTube - https://youtu.be/yvcCRcztQi4
#Spivak polynomial #functor tm
f : a -> b & list of a's
Gives a list of b's
Sounds like a functor
Damn right! list is a #functor !
how do you lazily thread a #monad to your computation?
You pass it to a #functor, using a #catamorphism
You can also convert a non -recursive data type to a recursive type
IE putting tail calling part of recursive type/ function R and putting it as type parameter, you can compose ( if not derive, like you can, with un/fix) a #functor FR this way.
If you compose a #recursion scheme in algebra A, you can compose scheme w opposite effect in CO-A
- If a #functor F : D → C is one half of an equivalence of categories then it is left adjoint in an adjoint equivalence of categories, i.e. an #adjunction whose unit and counit are #isomorphisms
- Free objects are all examples of a left adjoint to a forgetful #functor which assigns to an algebraic object its underlying set
- the functor T is represented by (S, {1}) where S is the #Sierpiński space. That is, T is naturally isomorphic to the Hom #functor Hom(–, S) with the natural #isomorphism determined by the universal element {1} ∈ T(S). This is generalized by the notion of a #presheaf