tinedel: (Default)
Ivan ([personal profile] tinedel) wrote2010-11-29 01:46 pm

ВНЕЗАПНО! Forth. сломай себе мозг

: fac1 ( n1 -- n )
1 facrec ;

: facrec ( n1 n2 -- n ) recursive
over
dup 0> if
* swap 1- swap facrec
else
drop nip
endif ;

мой любимый факториал без расширения стека

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting