tag:blogger.com,1999:blog-5336273.post4815256103882564718..comments2023-08-23T21:56:42.999+09:00Comments on A++ [Eric Torreborre's Blog]: The Essence of the Iterator PatternUnknownnoreply@blogger.comBlogger36125tag:blogger.com,1999:blog-5336273.post-50065166829904259392022-04-25T17:11:29.371+09:002022-04-25T17:11:29.371+09:00Bubble Shooter Games 2 has lots of bubbles, pro co...Bubble Shooter Games 2 has lots of bubbles, pro color and ball shooting games in 2022. <a href="https://play.google.com/store/apps/details?id=com.malikgames.bubbleshooter" rel="nofollow">Bubble Shooter Classic</a> is best played with pro friends. Match 3 to pop origin bubbles. This new game is first launched in 2022 game.<br />LyricsKubehttps://www.blogger.com/profile/01094761795230597031noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-38819649477169064532022-02-26T20:05:25.012+09:002022-02-26T20:05:25.012+09:00Howdy! I could have sworn I've visited your bl...Howdy! I could have sworn I've visited your blog before but after looking at some of the articles I realized it's new to me. Anyways, I'm certainly happy I found it and I'll be book-marking it and checking back often! Check out our <a href="https://trickscage.net/" rel="nofollow">Hosting Coupons</a><br />Andrew Brewhttps://www.blogger.com/profile/15996216128041208008noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-28156384113711034432019-09-03T21:54:59.972+09:002019-09-03T21:54:59.972+09:00Thanks for the feedback, I added a "(call by ...Thanks for the feedback, I added a "(call by name)" comment in the Pointed description. It also interesting to see how this has all changed now with the majority of the community feeling that `Pointed` was not a good idea for a typeclass (because it is lawless).Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-63163443828043161462019-09-03T17:36:50.127+09:002019-09-03T17:36:50.127+09:00Ah, I saw the earlier question. Call-by-value. Gos...<br />Ah, I saw the earlier question. Call-by-value. Gosh, it's really a tripping point.<br /><br />Please write it a lot more clearly, because before asking here I wasted half an hour browsing all sort of pages about Scale typing, without finding it mentioned.<br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5336273.post-68150646459285482512019-09-03T17:31:45.513+09:002019-09-03T17:31:45.513+09:00Two questions, after the initial start of reading:...Two questions, after the initial start of reading:<br />- inside the definition of trait Pointed what does it mean that point accepts a parameter of type "=> A"?<br />- why is it that every implementation of point goes down to List(a), which looks to me accepting a param of type A, not "=> A"?<br /><br />I understand that "=> A" could be kind of a function returning an A, but you yourself write "there is a point function taking a value of type A and returning a F[A]". So I don't see the point of this "=> A".<br /><br />Thank you for your attention.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5336273.post-60622383183446526912013-05-02T20:44:06.279+09:002013-05-02T20:44:06.279+09:00Hi @pagoda_5b,
I'm glad that you like this po...Hi @pagoda_5b,<br /><br />I'm glad that you like this post, even months later! <br /><br />There is no type error on the collect operation, it indeed has only 2 type parameters, one for the applicative (an Int counter using State) and one for the result of "map" operation. The Int type parameter you are tempted to add is in a sense already there because it is in the type of the binary tree that owns the collect operation.<br /><br />Not that I trust myself that much btw, that's just what the compiler tells me :-)Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-12740492586845133112013-05-02T16:55:09.057+09:002013-05-02T16:55:09.057+09:00I know I'm a bit late, but a good reading rem...I know I'm a bit late, but a good reading remains such for years.<br />I think I spotted a small error on the first example for collect. It looks like there's one type parameter missing from the call<br /><br />tree.collect[({type l[A]=State[Int, A]})#l, Int, String](count, map).apply(0) must_== <br /> (2, Bin(Leaf("1"), Leaf("2")))<br /><br />Here I added Int as the second type parameter, missing from your code.<br /><br />Really nicely done article!<br />good luckpagoda_5bhttps://www.blogger.com/profile/16499815949180321471noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-69363208243518085812013-03-11T12:18:21.482+09:002013-03-11T12:18:21.482+09:00I fixed the type signature, thanks!I fixed the type signature, thanks!Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-90191786231645085882013-03-11T11:12:07.856+09:002013-03-11T11:12:07.856+09:00Shouldn't the return type of the disperse func...Shouldn't the return type of the disperse function be T[A] => F[T[C]] instead of F[A] => F[T[C]] ?The Anarchist Rathttps://www.blogger.com/profile/03917399614648339119noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-71510820349610688652012-02-13T06:43:22.012+09:002012-02-13T06:43:22.012+09:00Daniel,
Thanks for your comments.
There was a li...Daniel,<br /><br />Thanks for your comments.<br /><br />There was a link to Learn-Yourself-a-Haskell under the Monoid word but was not visible, so I added a more visible link.<br /><br />I also changed the type in the Const definition to make it more consistent with the rest indeed.Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-54937371819617770622012-02-12T08:24:35.234+09:002012-02-12T08:24:35.234+09:00Also... could you please redefine Const as "c...Also... could you please redefine Const as "case class Const[M, +A](value: M)"? I have a terrible time dissociating the "A" used in the original definition from the "A" type parameters used on the following definitions.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-38336137773394575552012-02-12T07:54:18.606+09:002012-02-12T07:54:18.606+09:00I understand that Scalaz is a bit of a pre-requisi...I understand that Scalaz is a bit of a pre-requisite here, but this article would be much easier to follow if you had presented Monoid like you did the other basic concepts. It seems to be the only relevant concept whose interface/definition was not presented.Danielhttps://www.blogger.com/profile/07505997833685327219noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-59229773910293560952012-01-11T15:32:51.193+09:002012-01-11T15:32:51.193+09:00it is posting like these that give us hope!!it is posting like these that give us hope!!Unknownhttps://www.blogger.com/profile/12150618963404349707noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-5707433214517070682012-01-11T15:32:49.164+09:002012-01-11T15:32:49.164+09:00it is posting like these that give us hope!!it is posting like these that give us hope!!Unknownhttps://www.blogger.com/profile/12150618963404349707noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-42616507257330916522012-01-11T15:32:30.128+09:002012-01-11T15:32:30.128+09:00it is posting like these that give us hope!!it is posting like these that give us hope!!Unknownhttps://www.blogger.com/profile/12150618963404349707noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-3103331380557702372011-11-17T03:14:48.471+09:002011-11-17T03:14:48.471+09:00Thank you Eric,
I have caught the idea.
Really a...Thank you Eric,<br /><br />I have caught the idea.<br /><br />Really a great stuff<br /><br />BenoitBenoithttps://www.blogger.com/profile/16235484185896374392noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-41323664183070455722011-11-16T06:51:19.939+09:002011-11-16T06:51:19.939+09:00@Benoit, yes it's a call-by-name parameter and...@Benoit, yes it's a call-by-name parameter and it's particularly important if the Functor is a Future for example. Because in that case you want the value to be evaluated in another thread and not right away.Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-47842676527692663402011-11-16T04:14:57.578+09:002011-11-16T04:14:57.578+09:00Just missed "call-by-name parameter"
Ch...Just missed "call-by-name parameter"<br /><br />Cheers<br /><br />BenoitBenoithttps://www.blogger.com/profile/16235484185896374392noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-59346693868581236932011-11-16T03:01:16.216+09:002011-11-16T03:01:16.216+09:00This is clearly a great post.
But I hardly unders...This is clearly a great post.<br /><br />But I hardly understand the definition of the Pointed Functor (maybe I should do something else rather trying to learn functionnal programming :)) :<br /><br />Why do you write :<br /><br /> def point[A](a: => A): F[A]<br /><br />instead of :<br /><br /> def point[A](a:A): F[A]<br /><br />as far as point is a "function taking a value of type A and returning a F[A]"?<br /><br />Thank you<br /><br />BenoitBenoithttps://www.blogger.com/profile/16235484185896374392noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-84364410358554086232011-11-01T17:10:57.319+09:002011-11-01T17:10:57.319+09:00This is epic! I wish there were more explanations ...This is epic! I wish there were more explanations like this for other important papers related to functional programming. Real eye opener.dropfatdivahttps://www.blogger.com/profile/02332499620117520649noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-58723242459732080112011-06-29T15:24:42.810+09:002011-06-29T15:24:42.810+09:00Both fixes are done. Thanks again for this wonderf...Both fixes are done. Thanks again for this wonderful article which was an eye-opener for me!Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-5503565443461787462011-06-29T11:46:40.539+09:002011-06-29T11:46:40.539+09:00Erik, thanks for the nice overview of the EIP in S...Erik, thanks for the nice overview of the EIP in Scala! The article looks very nice. I added a link to this post on my web page. <br /><br />By the way, you made the typical mistake when spelling my last name :):<br /><br />Oliviera --> Oliveira<br /><br />You may also want to make it clear at the beginning that by "for loop" what is meant is something like "foreach" in C# (iteration over collections) and not "for" in C.Bruno Oliveirahttps://www.blogger.com/profile/08873562896412427971noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-15372539116898749932011-06-29T07:27:14.969+09:002011-06-29T07:27:14.969+09:00I updated the post with a paragraph showing the li...I updated the post with a paragraph showing the liftConst method (actually inspired from the <a href="https://github.com/scalaz/scalaz/blob/master/example/src/main/scala/scalaz/example/WordCount.scala" rel="nofollow">WordCount</a> example in the Scalaz library where Jason Zaugg implemented the last EIP example with Scalaz).Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-88644578829773582052011-06-28T23:08:53.278+09:002011-06-28T23:08:53.278+09:00I think it would be also good to mention liftConst...I think it would be also good to mention liftConst since this is what causes f: Int => List[Int] to be used as a Const in the first traverse example and is crucial since it puts the value of List(i) into the const (the methods that make Const into an applicative use either Monoid.z or Monoid.append and it is not clear where other values come from)Ittay Drorhttps://www.blogger.com/profile/06786072335349487451noreply@blogger.comtag:blogger.com,1999:blog-5336273.post-69374767680685658182011-06-28T21:12:15.158+09:002011-06-28T21:12:15.158+09:00You're right Ittay, I just took the same defin...You're right Ittay, I just took the same definition as the one in the article but fmap would also work.Erichttps://www.blogger.com/profile/16484514586929815703noreply@blogger.com