Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Haskell golf intro

3,259 views

Published on

第4回 スタートHaskell2 LT

  • ACCESS that WEBSITE Over for All Ebooks (Unlimited) ......................................................................................................................... DOWNLOAD FULL PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... DOWNLOAD FULL EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH }
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • accessibility Books Library allowing access to top content, including thousands of title from favorite author, plus the ability to read or download a huge selection of books for your pc or smartphone within minutes DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://urlzs.com/UABbn } ......................................................................................................................... Download Full EPUB Ebook here { https://urlzs.com/UABbn } ......................................................................................................................... ...................................ALL FOR EBOOKS................................................. Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • -- DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT -- ......................................................................................................................... ......................................................................................................................... Download FULL PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... (Unlimited)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THI5 BOOKS 1NTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m77EgH } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m77EgH } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/yyxo9sk7 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Haskell golf intro

  1. 1. Haskell golf への おさそい notogawa
  2. 2. だれ?• 大川 徳之• notogawa• Haskell golfer
  3. 3. golf ?• code golf (short codingとも) • 「より少ないバイト数で所与の課題 をプログラミングする遊び。より少 ない打(鍵)数を競うところがゴルフに 似ているところからの命名。」(はて なキーワードより)
  4. 4. Haskell golf 場• Haskell golf といえば • anarchy golf • AtCoder でもできなくはない?
  5. 5. おもしろいの?
  6. 6. 実際タノシイ!• パズルや制限プレイの感覚と同じ• 雰囲気がよくわかるエントリー • あなごるの楽しみ方
  7. 7. Haskell golf の特徴• 抽象的にみると短くなりやすい!• 短かくなってもわかりやすい!
  8. 8. やってみよう!• 第1回スタートHaskell2 練習問題 より • 1 から 10 までのすべての整数で割り切れ る数字 • 簡単のため最小の1個を出力としましょう
  9. 9. 普通に書くと• うろおぼえですが当時出てた回答例 main :: IO () main = print $ head [ n | n <- [ 1 .. ] , and [ 0 == mod n d | d <- [ 1 .. 10 ] ] ]こんなだったような?(当時はまだIOやってないので,適当に加えました)
  10. 10. この問題って結局...• 1∼10で割り切れる数 • = 1∼10の公倍数 • 最小公倍数の関数があるじゃない • lcm :: Integral a => a -> a -> a
  11. 11. 縮めていこうmain :: IO ()main = print $ 1 `lcm` 2 `lcm` 3 `lcm` 4 `lcm` 5 `lcm` 6 `lcm` 7 `lcm` 8 `lcm` 9 `lcm` 10 アッ!この計算foldだ!進研ゼミで(rymain :: IO ()main = print $ foldl1 lcm [ 1 .. 10 ] なくてもいい型シグネチャや空白を消すmain=print$foldl1 lcm[1..10]
  12. 12. 危険性• golfしかできなくなる • 「Haskellわかりませんがgolfはでき ます.」という謎スキル• お仕事では控えたほうがいいかも • やるなよ?やるなよ?
  13. 13. おわりやさしいgolfer達がみんなを待ってます
  14. 14. 文献• Haskell Golf 入門• Short Coding 職人達の技法 • Haskellじゃないけど参考になる

×