ã¡ãã£ã¨æãç«ã£ã¦ä½ã£ã¦ã¿ã¾ããã æåã¯Programming Praxisã§ç¤ºããã¦ããå®è£ ããåºçºãããã§ãããçµæçã«ã¯Haskellçã®å®è£ ã«è¿ãå½¢ã«å¤åãã¦ããã¾ããã ã¢ã«ã´ãªãºã çã®è§£èª¬ã¯Wikipediaã«è²ããã¨ã«ãã¦ãããã§ã¯ãã¯ããæ´»ç¨ãã¦ç ©éãªãã¿ã¼ã³ããããHaskellã£ã½ãç°¡æ½ã«è¡ãæ¹æ³ãªã©ããã¯ããã¯çãªè©±é¡ãå¿ç¨ä¾ãç´¹ä»ãããã¨æãã¾ãã ããªã¼æ§æ ã¾ããããªã¼ã®æ§é ãå®ç¾©ãã¾ãã (define-struct tree (color left node right)) (define empty (make-tree 'black #f (cons #f #f) #f)) (define (empty? t) (eq? t empty))ãã¼ã¨å¤ã¯ cons ã§çºã㦠node ã¨ãã¦ä¸ä½çã«æ±ããã¨ã«ãã¾ã (æåã¯å¥ã ã«ãã¦ãããã§ããããã¾ãã«
{{#tags}}- {{label}}
{{/tags}}