retroforth/example/select.retro
crc 1fc1ac6b2b advent of code, day 2
FossilOrigin-Name: 9eb8ac12ee6e66bbb29ee03c38002a36a993e9f4f674919a572b1e7baadba2ca
2021-12-02 16:46:43 +00:00

11 lines
178 B
Forth

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
```