is

get derivative type with given prototype


Parameters

is type :type
   prototype :dictionary :block

Returns

  • :type

Examples

copy
define :animal [ init: constructor [nick :string age :integer] speak: method [][ print "..." ] ] define :fish is :animal [] define :cat is :animal [ speak: method [][ print [~"|this\\nick|:" "'meow!'"] ] ] a: to :cat [] ; >> Runtime | cannot initialize object of type :cat\x0A; error | wrong number of parameters: 0 ; | expected: 2 (nick, age)\x0A\x0Ascooby: to :animal [\

copy
\

copy
7] scooby\speak ; ... bubble: to :fish ["Bubble" 1] bubble\speak ; ... snowflake: to :cat ["Snowflake" 3] snowflake\speak ; Snowflake: 'meow!'

Related