| tak res |
tak := nil.
tak := [:x :y :z |
x <= y ifTrue: [z] ifFalse: [
tak
value: (tak value: x-1 value: y value: z)
value: (tak value: y-1 value: z value: x)
value: (tak value: z-1 value: x value: y)
]
].
((Time millisecondsToRun: [res := tak value: 20 value: 10 value: 0]) -> res) printNl
fCB0YWsgcmVzIHwKdGFrIDo9IG5pbC4KdGFrIDo9IFs6eCA6eSA6eiB8CiAgIHggPD0geSBpZlRydWU6IFt6XSBpZkZhbHNlOiBbCiAgICAgIHRhawogICAgICAgICB2YWx1ZTogKHRhayB2YWx1ZTogeC0xIHZhbHVlOiB5IHZhbHVlOiB6KQogICAgICAgICB2YWx1ZTogKHRhayB2YWx1ZTogeS0xIHZhbHVlOiB6IHZhbHVlOiB4KQogICAgICAgICB2YWx1ZTogKHRhayB2YWx1ZTogei0xIHZhbHVlOiB4IHZhbHVlOiB5KQogICBdCl0uCgooKFRpbWUgbWlsbGlzZWNvbmRzVG9SdW46IFtyZXMgOj0gdGFrIHZhbHVlOiAyMCB2YWx1ZTogMTAgdmFsdWU6IDBdKSAtPiByZXMpIHByaW50Tmw=