Nov. 29th, 2010

tinedel: (Default)
: fac1 ( n1 -- n )
1 facrec ;

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

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

Profile

tinedel: (Default)
Ivan

April 2017

S M T W T F S
      1
2345678
910 1112131415
16171819202122
23242526272829
30      

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 13th, 2025 10:47 am
Powered by Dreamwidth Studios