Elmã§ãã£ã¦ã¿ãã·ãªã¼ãº5: éãã¼ã©ã³ãé»åã ããããä¸ã¤ã®éãã¼ã©ã³ãè¨æ³(Reverse Polish Notation, RPN)é»åã§ããå ¥åãã©ã¼ã ãSignalã«çµã³ã¤ãã¦å ¥åã¨ãã¦ä½¿ãä¾ã«ãªãã¾ããç§ã¯æ¬ç©ã®RPNé»åã使ã£ããã¨ããªãã®ã§æ¬ç©ã¨ã¯ãã¶ãåä½ãéãã¾ãã import Graphics.Input (input, button) -- é»åã®ãã¿ã³æä½ã®ç¨®å¥ data Keys = Number Int | Add | Sub | Mul | Div | Clear | Enter -- GUIããã®é»åã«å¯¾ããæä½å ¥ååã表ç¾ããã·ã°ãã«ãåæå¤ã¯Clearã keys = input Clear -- ç»é¢ãä½ãã calculator (n, xs) = let btn = button keys.handle btnN n = btn (Numb
{{#tags}}- {{label}}
{{/tags}}