{"title":" \u201c\u6700\u3082\u7c21\u5358\u306b fib \u3092\u9ad8\u901f\u5316\u3059\u308b\u65b9\u6cd5\u201d\u3092 Squeak Smalltalk \u3067","height":"190","description":"\u4e8c\u3064\u5024\u3092\u8fd4\u305b\u3070\u826f\u3044\u3093\u3067\u3059\u3088\u3002\u30e1\u30e2\u5316\u306a\u3093\u3066\u3057\u306a\u304f\u3066\u3044\u3044\u3002def fib_i(n) if n == 1 [1, 1] else x1, x0 = fib_i(n-1) [x1 + x0, x1] end enddef fib(n) fib_i(n)[0] end \u6700\u3082\u7c21\u5358\u306b fib \u3092\u9ad8\u901f\u5316\u3059\u308b\u65b9\u6cd5 - \u30c9\u30ec\u30c3\u30b7\u30f3\u30b0\u306e\u3088\u3046\u306a Squeak Smalltalk \u3067\u3082\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002\u30d6\u30ed\u30c3\u30af\u306e\u518d\u5e30\u3092\u4f7f\u3063\u3066\u3044\u308b\u306e\u3067 Squeak4.1 \u304c\u5fc5\u8981\u3067\u3059\u3002 | mrknFib | mrknFib := nil. mrknFib := [:n | | pairFib | pairFib := nil. pairF\u2026","url":"https://sumim.hatenablog.com/entry/20100910/p1","categories":["OOPL"],"version":"1.0","author_name":"sumim","width":"100%","type":"rich","provider_name":"Hatena Blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsumim.hatenablog.com%2Fentry%2F20100910%2Fp1\" title=\" \u201c\u6700\u3082\u7c21\u5358\u306b fib \u3092\u9ad8\u901f\u5316\u3059\u308b\u65b9\u6cd5\u201d\u3092 Squeak Smalltalk \u3067 - Smalltalk\u306et\u306f\u5c0f\u6587\u5b57\u3067\u3059\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2010-09-10 00:00:01","image_url":null,"blog_url":"https://sumim.hatenablog.com/","provider_url":"https://hatena.blog","blog_title":"Smalltalk\u306et\u306f\u5c0f\u6587\u5b57\u3067\u3059","author_url":"https://blog.hatena.ne.jp/sumim/"}