def f: Boolean => Option[Boolean] Write as many functions with this type as you can. There are Option[Boolean]^Boolean of them. 9
-
-
-
Ok I think I got it. Suppose you hardcoded the exact return value separately for each possible input value. (Any logic can only be a simplification of that.) If there are N possible inputs and M possible outputs then any implementation has M choices for each of the N inputs.
1 reply 0 retweets 0 likes -
(maybe a better phrasing would be, N choices to make, with M options that each one can choose from) It's interesting that a function with N inputs and M outputs isomorphic to a TupleN[M, M...]
1 reply 0 retweets 0 likes -
Replying to @nafg613 @TomTriple
Yep. Now calculate how many of these: def identity[A]: A => A
1 reply 0 retweets 0 likes -
Replying to @dibblego @TomTriple
Of course I know there is 1, but how can my reasoning work here? I guess in the scope of a type variable we don't care about number of inhabitants in an absolute sense but how many it can obtain. Since it can only get 1 A that's the number we use
2 replies 0 retweets 0 likes -
Replying to @nafg613 @TomTriple
// start here trait Yoneda[F[_], A] { def run[B]: (A => B) => F[B] def lower: F[A] = run(identity) }
1 reply 0 retweets 0 likes -
Replying to @dibblego @TomTriple
What about it? How does this relate to the thread?
1 reply 0 retweets 0 likes -
Replying to @nafg613 @TomTriple
... but how can my reasoning work here? That's where you start, your reasoning.
1 reply 0 retweets 0 likes -
Replying to @dibblego @TomTriple
Now you're just confusing me. I'm not sure why you quoted a question I answered, or why you're telling me where to start. I just asked how yoneda relates to this thread
1 reply 0 retweets 0 likes
You asked a question. Here it is again: > Of course I know there is 1, but how can my reasoning work here? Then I gave an answer. Here it is again: // start here trait Yoneda[F[_], A] { def run[B]: (A => B) => F[B] def lower: F[A] = run(identity) } HTH
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.