タグ

2013年3月10日のブックマーク (3件)

  • Scheme:なぜSchemeにはreturnが無いのか

    あるいは、なぜcall/ccがプリミティブなのか、に関する一考察 (Shiro: 「なんでも継続」に入れようかと思ってたネタだけど、 あっちがいつ書けるかわからんので、忘れないようにこっちにまとめとく) (話の流れがあるので、誤りの修正以外のコメントは途中ではなく、一番下にお願いします) returnはどこだ? Aliceは、リストlisと述語手続きpredを取り、lisの各要素に順にpredを適用して、 predが真の値を返したら直ちにその要素を返すような関数findを 書くことを考えた。 (findは便利なので、実はsrfi-1に定義されてるけど、 Aliceはまあ自分の勉強のために書いてみることにしたと思いねえ)。 AliceはPerlなら良く知っている。Perlならこんな感じで書けるはず。 sub find { ($pred, $lis) = @_; foreach $elt (@

    Scheme:なぜSchemeにはreturnが無いのか
    grafi
    grafi 2013/03/10
  • Top (Gauche Users’ Reference)

    Top This is a reference manual of Gauche, an R7RS Scheme implementation.

    grafi
    grafi 2013/03/10
    resetで囲まれた部分だけをshiftが現れたらCPS変換するってことかな??
  • swatmac.info

    swatmac.info Buy this domain. 2020 Copyright. All Rights Reserved. The Sponsored Listings displayed above are served automatically by a third party. Neither the service provider nor the domain owner maintain any relationship with the advertisers. In case of trademark issues please contact the domain owner directly (contact information can be found in whois). Privacy Policy