math.extras: adding "until-zero".

db4
John Benediktsson 2012-08-31 15:00:53 -07:00
parent a454b2e384
commit 5af4627e18
1 changed files with 3 additions and 0 deletions

View File

@ -148,3 +148,6 @@ PRIVATE>
: sinc ( x -- y )
[ 1 ] [ pi * [ sin ] [ / ] bi ] if-zero ;
: until-zero ( n quot -- )
[ dup zero? ] swap until drop ; inline