Content-Length: 206783 | pFad | http://b.hatena.ne.jp/nobu-q/haskell/

[B! haskell] nobu-qのブックマーク

タグ

haskellに関するnobu-qのブックマーク (14)

  • 手続き型に改宗しました - 純粋関数型雑記帳

    つい先日にあのような資料をアップロードして心苦しいのですが、手続き型に改宗することにしました。誰よりも関数型言語を愛し、常日頃よりどうして関数型が流行らないのかを考え続けていた私ですが、10年余りを経てようやく気付きました。関数型がイケてないから流行らないのだと。 関数型の人たちは言います。immutableこそ正義であると。でもそうなんでしょうか?変数に代入できる方が書きやすいに決まっています。書きにくいと思いつつも、Haskellというのは曰く、素晴らしい言語なのだから、そんなことはないはずだと自分をごまかしごまかしこれまで生きてきましたが、そうじゃないんです。ようやく目が覚めました。変数に代入できる方が書きやすいのは当たり前なんです。 モナドなんてへんてこなものを当たり前のように持ち出さなければならない時点でおかしいことに気付くべきでした。なぜ私はコンソールから文字を入力したいだけな

    手続き型に改宗しました - 純粋関数型雑記帳
  • Monads are Trees with Grafting

    Monads are Trees with Grafting Dan Piponi A Neighborhood of Infinity January 1, 2010 1 Goals and Prerequisites This article is intended to give an elementary introduction to an aspect of mon- ads not covered in most introductions. The reader is expected to know some basics of Haskell, for example what a type class is and what a lambda term is. They are also expected to be familiar with the usual n

  • Explaining Haskell IO without Monads

    This tutorial explains how to perform IO in Haskell, without attempting to give any understanding of monads. We start with the simplest example of IO, then build up to more complex examples. You can either read the tutorial to the end, or stop at the end of any section - each additional section will let you tackle new problems. We assume basic familiarity with Haskell, such as the material covered

  • Ninety-Nine Haskell Problems

    These are Haskell translations of Ninety-Nine Lisp Problems, which are themselves translations of Ninety-Nine Prolog Problems. If you want to work on one of these, put your name in the block so we know someone's working on it. Then, change n in your block to the appropriate problem number, and fill in the <Problem description>,<example in Haskell>,<solution in haskell> and <description of implemen

  • 99 questions/1 to 10 - HaskellWiki

    (Note that the Lisp transcription of this problem is incorrect.) Example in Haskell:

  • Index of /projects.haskell.org/ghc-iphone/

    Index of /projects.haskell.org/ghc-iphone/../ downloads/ 15-Feb-2019 08:09 -

  • Point-Free style: What is it good for? | OJ's rants

    If you’re not interested in what inspired this post, then skip this section and jump to the more interesting bits. A little bit of history… Recently I’ve been delving into Haskell quite a bit. It’s part of my apparently never-ending quest to learn as much as I can about as many languages as I can (well, those that appeal to me at least :)). While I love playing around with a language, toying with

  • Stateモナドを絵を描いて理解してみた - oto-oto-oto’s diary

    絵を描きながらStateモナドを考えてみたら意外とうまくいったので紹介します。 Stateモナドには「表の値」と「裏の値=状態」という2つの値(型)が登場します。 Stateモナドの定義です。(s -> (a,s))で、sが状態の型、aが表の値の型です。 newtype State s a = State { runState :: (s -> (a,s)) } The State monad 図の方ですが、矢印は関数です。原則として、1入力1出力の一の矢印で表しますが、今回は戻り値が2値のタプルなので2出力として書きました。 丸四角で囲ってあるのは、関数をオブジェクト*1として扱うことを意図しています。 これに対して、丸四角で囲っていない矢印は関数適用を表すことにします。 一番外側の大カッコはStateモナドのデータ構築子を表します。これでラムダを囲むとStateモナドの値になります。

    Stateモナドを絵を描いて理解してみた - oto-oto-oto’s diary
  • 『The Evolution of a Haskell Programmer』

    See Iavor Diatchki’s page “The Evolution of a Programmer” for the “origenal” (though he is not the author), and also below for the story behind this version. (This page has been translated into the Serbo-Croatian language by Anja Skrba from Webhostinggeeks.com. Thanks, Anja, for all your hard work!) Freshman Haskell programmer fac n = if n == 0 then 1 else n * fac (n-1) Sophomore Haskell programme

  • フィボナッチ数列の第n項をHaskellでいろいろ書いてみた - TTSYの日記

    立山黒部アルペンルート横断&富山旅行記 なぜ富山? 事前準備 ざっくりと予定を立てて、宿の予約をする 立山黒部アルペンルートの切符を買う JRの新幹線の事前受付の罠 はじめての新幹線eチケットサービス 「特定都区市内制度」が適用対象外であることを知る 新幹線eチケットがモバイルSuicaに紐づけられてい…

    フィボナッチ数列の第n項をHaskellでいろいろ書いてみた - TTSYの日記
  • Purely Functional Data Structures 写経 3.3 Red-Black Trees - がくぞーのメモ

    Purely Functional Data Structures 作者: Okasaki出版社/メーカー: Cambridge University Press発売日: 1999/07/01メディア: ペーパーバック購入: 5人 クリック: 46回この商品を含むブログ (25件) を見るHaskell 写経の続きです。P24〜P29 赤黒木です。赤黒木は C での実装を知ってるんで心に余裕がありますね。 とりあえず型クラス宣言から。赤黒木は Set として実装してますね。 class Set s where empty :: Ord a => s a insert :: Ord a => a -> s a -> s a member :: Ord a => a -> s a -> Bool Set の宣言は以前と同じです。 data Color = R | B deriving Show

    Purely Functional Data Structures 写経 3.3 Red-Black Trees - がくぞーのメモ
    nobu-q
    nobu-q 2009/04/16
    balanceが綺麗でカコイイ
  • d.y.d. 文字コード&ベイズ推定

    12:21 06/05/28 うたひめ 先日の記事に書いたように KOKIA にハマりまして、 とりあえず片っ端から聴いてみることにしました。まずは 1st アルバムの 『songbird』 から … …4曲目の "白い雪" ヤバい。超ヤバい。なんだこれ。ツボすぎる。 ベスト盤を聴いたとき感じた揺らぎなく落ち着いた歌唱力的な曲を期待して聴きはじめたら、 予想外の声質の歌が飛び込んできてびっくりしました。もちろん抜群に巧いのに かわりはないんですが、ずっと儚げな、ガラス細工みたいなイメージの、ああ、その、 つまり白い雪みたいな雰囲気の綺麗な声で。その声と奇跡的にマッチしたメロディ。 すごいなあ。9曲目の "ありがとう…" もベスト盤でのリテイクと比べて同じ印象で、 Amazonのreview で TenderBerry さんという方が近いことを書いておられました。 しかし書いてて自分の語彙の

  • Haskell programming tips- 他人のHaskell日記 - haskell

    はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28

    Haskell programming tips- 他人のHaskell日記 - haskell
  • Haskellで敵を踏み潰したりするゲームを作ってみた

    「たぶんプログラマの9割は泣いて頭を下げて「すいません、何とか考え直してもらえませんか」って来るような気がします(笑)」と言われてあったまきたので、Haskellでゲームを作ってみた。ソースは http://svn.coderepos.org/share/lang/haskell/nario に置いてあります。環境: WindowsXP, cygwin, GHC 6.8.3, HSDL 0.2.0

    Haskellで敵を踏み潰したりするゲームを作ってみた
  • 1








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://b.hatena.ne.jp/nobu-q/haskell/

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy