Name

as-prototype

Usage

builtin-function

Syntax

(as-prototype obj)

Description

Adds the contents of a hashtable, the values of static properties of a type or the instance properties of an object to a prototype hashtable.

user 1 > (as-prototype date-time:T)
it: #s( :max-value "9999-12-31 23:59:59"
        :min-value "0001-01-01"
        :now "2017-05-13 09:21:49"
        :today "2017-13-05"
        :utc-now "2017-05-13 07:21:49" )
user 2 > :d
#s( :type "Kiezel.Prototype"
    :type-specifier null
    :value #s( :max-value "9999-12-31 23:59:59"
               :min-value "0001-01-01"
               :now "2017-05-13 09:21:49"
               :today "2017-13-05"
               :utc-now "2017-05-13 07:21:49" ) )

user 2 > (as-prototype (date-time:now))
it: #s( :date "2017-13-05"
        :day 13
        :day-of-week Saturday
        :day-of-year 133
        :hour 9
        :kind Local
        :millisecond 310
        :minute 21
        :month 5
        :second 49
        :ticks 636302641093107870
        :time-of-day 09:21:49.3107870
        :year 2017 )
user 3 > :d
#s( :type "Kiezel.Prototype"
    :type-specifier null
    :value #s( :date "2017-13-05"
               :day 13
               :day-of-week Saturday
               :day-of-year 133
               :hour 9
               :kind Local
               :millisecond 310
               :minute 21
               :month 5
               :second 49
               :ticks 636302641093107870
               :time-of-day 09:21:49.3107870
               :year 2017 ) )