Or map... Do you know why Set and Map don't have a map function?
-
-
Replying to @evanburchard
map must preserve structure. Consider Set(['a', 'b', 'c']).map(x => x.length) // Set(1)
2 replies 0 retweets 0 likes -
Replying to @drboolean @evanburchard
map only needs to preserve identity and composition. Consider ((->) t) with no length or structure, yet has map.
1 reply 0 retweets 0 likes -
Replying to @dibblego @drboolean
I can pronounce those characters individually, but I don't understand ((->) t). Can you point me somewhere?
2 replies 0 retweets 0 likes -
Replying to @evanburchard @drboolean
Now substitute (f) with ((->) t) (a -> b) -> ((->) t a) -> ((->) t b) (a -> b) -> (t -> a) -> (t -> b) ∘
1 reply 0 retweets 0 likes -
Replying to @dibblego
I appreciate your effort, but I'm still not getting it. I'm a Fire Keramik. What is ((->) t) in words? Something I can look up?
1 reply 0 retweets 0 likes -
Replying to @evanburchard
It is commonly called "reader." Do you know Haskell syntax? map :: (a -> b) -> f a -> f b
1 reply 0 retweets 0 likes -
Replying to @dibblego
I'm haskell-curious. I don't know reader yet though.
1 reply 0 retweets 0 likes -
Replying to @evanburchard
Perhaps this helps. https://gist.github.com/tonymorris/0c78e5d122bfb98d5eff15d456bb88a5 …
1 reply 0 retweets 0 likes -
Replying to @dibblego
This is my first time hearing "Function composition is a specialization of map." Thanks for that.
1 reply 0 retweets 0 likes
No prob. The generalisation is typically called a covariant functor.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.