30åããã°ã©ã ããã®445ããµã¨æãã¤ãã¦OCamlDebugã試ãã¦ã¿ãããäºæ³ä»¥ä¸ã«ç±ãã£ãã ã¹ãããå®è¡ãå¤æ°è¡¨ç¤ºããã¬ã¤ã¯ãã¤ã³ããªã©æ®éã®æ©è½ãããã®ã¯ãã¡ããã®ãã¨ã1ã¹ãããæ»ããªãã¦ãã¨ãã§ãããéæ¹åã«å®è¡ã£ã¦ãç±ãããã ãã»ã»ã»ã ãããã°ããã³ã¼ã let rec fact n m = if n = 0 then m else let m' = n * m in fact n m' let _ = Printf.printf "%d\n" (fact 1 10) ä»åãããã°ããã®ã¯ãæ«å°¾å帰ã§ä¼å ´ãè¨ç®ãããã¤ã ãã®æ®µéã§ãã°ãè¦ã¤ãã¦ããæ°ã«ãã¦ã¯ããã¾ããã ã³ã³ãã¤ã« ocamlcã§ã³ã³ãã¤ã«ããã-gãä»ããã®ãå¿ããã«ã $ ocamlc -g -o fact fact.ml ãããã¬èµ·å ocamldebugã³ãã³ãã使ã£ã¦ããããã ãã©ãEmac
{{#tags}}- {{label}}
{{/tags}}