Anonymous user
Constrained genericity: Difference between revisions
m
→{{header|Forth}}
Line 375:
5 - ;
: (where) { class-xt where-xt -- flag }
begin
class-xt ['] object <>
Line 382:
class-xt >body sfa @ dfa>xt to class-xt
repeat false ;
: where ( class-xt "classname" -- flag )
' state @
if postpone literal postpone (where)
else (where)
then ; immediate
:class Eatable
Line 391 ⟶ 397:
object-list eatable-types
:m fill: { n class-xt -- }
class-xt
if n 0 do class-xt eatable-types xtadd: loop
else ." not an eatable type "
|