Super-dee-duper D features
Walter Bright
newshound at digitalmars.com
Tue Feb 13 18:20:26 PST 2007
X Bunny wrote:
> (defun ack (x y)
> (declare (fixnum x y))
> (the fixnum
> (if (zerop x)
> (1+ y)
> (if (zerop y)
> (ack (1- x) 1)
> (ack (1- x) (ack x (1- y)))))))
>
> The structure is no less obvious to me then the C. I can see the input
> and output types are clearly fixnums. The branches of the ifs are obvious.
I see:
1- x
in the Lisp code, and have to mentally translate it to:
x - 1
and not:
1 - x
This just hurts my brain.
More information about the Digitalmars-d
mailing list