펑터Functor

하스켈 펑터 입문자를 위한 이 글은 `Maybe Int` 타입의 값에서 `Int`를 직접 "꺼내올 수 없다"는 개념을 설명합니다. `Maybe`의 `fmap`이나 `fromJust`가 마치 값을 꺼내는 것처럼 보이지만, 이는 실제로는 값을 꺼내는 것이 아니라, 원본 타입(`Int`)의 구조를 보존하며 새로운 `Maybe Int` 타입의 값을 "생성"하는 과정이라는 것입니다. 미끄럼틀 비유를 통해, `Maybe Int`의 `Just 1`은 `Int` 값 `1`과 연관되어 있지만, `Just 1` 자체가 `1`을 의미하는 것은 아닙니다. 펑터는 원본 타입의 관계(구조)를 그대로 유지하며 다른 타입으로 변환하는 역할을 합니다. `fmap`은 `Maybe Int` 안의 `Int`를 직접 조작하는 것이 아니라, 원본 `Int` 값의 관계를 바탕으로 새로운 `Maybe Int` 값을 만들어내는 것입니다. 상자 메타포가 유용할 때도 있지만, 펑터의 본질을 오해하게 만들 수 있습니다. 상자 안의 값을 꺼내는 것이 아니라, 값의 "성격"은 값을 다루는 함수들의 동작에 따라 결정된다는 점을 강조합니다. 이 글은 "없을 수도 있는 수를 꺼낸다"는 표현의 모순을 지적하며, 펑터의 개념을 더 깊이 이해하도록 돕습니다.

Hackers' Pub

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/

#expected #functor #monad #optional #ranges

C++ on Sea

예전 펑터 글에 "펑터 값을 프리미티브한 값처럼 쓰고 싶다"라는 목표를 먼저 세우고, `<$>`와 `<*>`등을 살펴보는 내용을 추가했습니다.
https://lionhairdino.github.io/posts/2023-03-09-functor.html

#하스켈 #펑터 #Haskell #Functor

한 번쯤 나올 법 했는데, 아직 없었던 펑터 이야기

수학에서 말하는 펑터가 하스켈에 어떤 모양, 어떤 이유로 들어왔는지 상상해본 글입니다.

Lionhairdino

a는 Identity a라고 본다면, 세상의 모든 값을 펑터 값으로 생각할 수 있습니다. 항상 함수를 적용할 때는 f <$> a라 쓸 수 있습니다. 간단한 프리미티브 값이든, 복잡한 계산 후 받는 값이든 모두 같은 것으로 취급할 수 있습니다.

FRP에서 Event, Behavior를 일반 값처럼 쓰기 위해, 특별한 테크닉이 필요하지 않습니다. 원래 펑터가 그런 것입니다.

#하스켈 #펑터 #Haskell #functor #FRP #Event #Behavior

The documentation for my video on Monads, Monoids and Functors is available on Scribd everyone #kotlin #haskell #mona #monoid #functor
https://www.scribd.com/presentation/779087903/Monads-Are-No-Nomads
Monads Are No Nomads | PDF

A presentation going around the basic concepts surrounding functors, monoids and monads. They are discussed in Haskell and Kotlin domains and the idea is to give an empirical and instinct feeling about what they are, so that we can process better our thoughts with higher level concepts to find solutions for our every day programming language challenges.

Scribd
My new video about functors, monoids and monads everyone! Watch for free on JESPROTECH. #functor #monads #monoids #haskell #kotlin https://www.youtube.com/watch?v=ShGAN0dguUg&si=gcV2XlRvZE3OTXTZ
Monads are no Nomads! - Basics Unlocked - Challenge unlocked

YouTube

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

Before you continue to YouTube

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:

#haskell #composition #code #functor

https://youtube.com/shorts/dirV589Xapg?feature=share

Before you continue to YouTube

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).

@nuttycom @me If we agree that "map" is a good name for what "fmap" does (and as a non-native speaker of English, I think it is), then the adjectival-ish name of Functor could simply be "Mappable".

#fmap #Functor #namingThings