From: John Benediktsson Date: Fri, 18 Mar 2022 21:01:44 +0000 (-0700) Subject: math.parser: adding >dec alias to number>string X-Git-Tag: 0.99~1475 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=1945b8f54cd62c7d6dd811586ee21bf43d6794a6 math.parser: adding >dec alias to number>string --- diff --git a/core/math/parser/parser.factor b/core/math/parser/parser.factor index 0802242165..6284e66c32 100644 --- a/core/math/parser/parser.factor +++ b/core/math/parser/parser.factor @@ -488,6 +488,8 @@ GENERIC#: >base 1 ( n radix -- str ) : >oct ( n -- str ) 8 >base ; inline : >hex ( n -- str ) 16 >base ; inline +ALIAS: >dec number>string + M: integer >base { { [ over 0 = ] [ 2drop "0" ] }