retroforth/example/select.retro

12 lines
178 B
Forth
Raw Normal View History

Select will discard one of two values based on a passed
flag.
~~~
:select (abf-) &drop &nip choose ;
~~~
```
#100 #200 TRUE select n:put nl
#100 #200 FALSE select n:put nl
```