Prelude Control.Applicative> let superdot =
(((<*>).(((<*>).).(((.).).).(.)))<*>const const)
Prelude ...> :t superdot
superdot ::
(b -> b -> c) -> (b1 -> b) -> b1 -> b1 -> c
Prelude ...> superdot compare snd (0, 1) (0, 0)

Hi, it is NISHIO Hirokazu. I just needed "dot" operator for 2-args function.

Prelude ...> let superdot = \f g x y -> f (g x) (g y)
Prelude ...> superdot compare snd (0, 1) (1, 0)

Why such a function isn't in Prelude?


Haskell Quiz

This entry was moved to NISHIO Hirokazu's blog


Haskell's random

Hi, it is NISHIO Hirokazu, Haskell newbie. Today I post a small code. It's not a bug. It's a feature of Haskell.

$ ghci
GHCi, version 6.8.3
Prelude> import Random
Prelude Random> let g = mkStdGen 1
Prelude Random> (fst (random g)) + 0
Prelude Random> (fst (random g)) / 1
Prelude Random> (fst (random g)) * 1
Prelude Random> (fst (random g)) * 1.0

Yes, it is a feature. Haskell's random changes its behavior by what type inferred. See The Haskell 98 Library Report: Random Numbers.



What The Fuck --- Twitter Trending from Japan('BEAT CRUSADERSが' and 'のTwitter廃人度は')

Hi, this is takano32.

Today's Twitter Trending in Worldwide is such as picture.

Many people are saying "What The Fuck? 'BEAT CRUSADERSが' and 'のTwitter廃人度は'".

There two words are Trendings from Japan.

'BEAT CRUSADERS' is rock band and they are active in Japan.
Today, BEAT CRUSADERS is publishing their breakup at official Web site.
And many Japanese shout "BEAT CRUSADERSが解散!?" in Twitter.
This means "Is it really breakup of BEAT CRUSADERS!?".

'Twitter廃人度' means how junky for Twitter.
A Web service telling fortune is a one of the most hot twitter service in Japan.
Today's trending fotune-telling Web service is Twitter廃人度チェッカー --- Check how are you junky for Twitter.
Many Japanese are check themselves and tweet their results in Twitter and make Twitter Trending 'のTwitter廃人度は'.

Many Japanese are affected by trend easily and a number of Japanese Twitter user is increasing.
So a number of trending words in Japanese may increase in the future.

Thank you.