faster, smaller code when using curry

FossilOrigin-Name: e31098c74df8e29ad7545e52b593a9564123088e5bf772762237341e8dec3ef6
This commit is contained in:
crc 2019-07-12 21:13:11 +00:00
parent 30e43b5003
commit b8d326aef3
3 changed files with 634 additions and 633 deletions

BIN
ngaImage

Binary file not shown.

File diff suppressed because it is too large Load diff

View file

@ -816,7 +816,7 @@ both leading and trailing spaces.
~~~
:s:trim-left (s-s)
s:temp [ fetch-next [ #32 eq? ] [ n:-zero? ] bi and ] while
s:temp [ fetch-next [ [ #32 eq? ] [ #10 eq? ] [ #13 eq? ] tri or or ] [ n:-zero? ] bi and ] while
n:dec ;
:s:trim-right (s-s) s:temp s:reverse s:trim-left s:reverse ;
:s:trim (s-s) s:trim-right s:trim-left ;
@ -1247,7 +1247,7 @@ In a traditional Forth this is similar in spirit to DOES>.
~~~
:curry (vp-p)
here [ swap compile:lit compile:call compile:ret ] dip ;
here [ swap compile:lit compile:jump ] dip ;
:does (q-)
d:last<xt> swap curry d:last d:xt store &class:word reclass ;
~~~