Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Ackermann (was Re: language shoot-out)

From: rotenca:telvia:it at: 6-Nov-2002 22:24

What i do not understand well is why this stops at 1374: ack41: func [m [integer!] n [integer!] /local result f2][ md: max md cd: cd + 1 tot: tot + 1 if m = 0 [cd: cd - 1 return n + 1] if n = 0 [result: ack41 m - 1 1 cd: cd - 1 return result] result: ack41 m - 1 ack41 m n - 1 cd: cd - 1 result ] and this stops at 2181 (ack41 3 9) ack41: func [m [integer!] n [integer!] /local result f2] [ md: max md cd: cd + 1 tot: tot + 1 if m = 0 [cd: cd - 1 return n + 1] if n = 0 [result: ack41 m - 1 1 cd: cd - 1 return result] f2: ack41 m n - 1 result: ack41 m - 1 f2 cd: cd - 1 result ] --- Ciao Romano