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-04-09 16:55:30"
        :today "2017-09-04"
        :utc-now "2017-04-09 14:55:30" )
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-04-09 16:55:30"
               :today "2017-09-04"
               :utc-now "2017-04-09 14:55:30" ) )

user 2 > (as-prototype (date-time:now))
it: #s( :date "2017-09-04"
        :day 9
        :day-of-week Sunday
        :day-of-year 99
        :hour 16
        :kind Local
        :millisecond 721
        :minute 55
        :month 4
        :second 30
        :ticks 636273537307215550
        :time-of-day 16:55:30.7215550
        :year 2017 )
user 3 > :d
#s( :type "Kiezel.Prototype"
    :type-specifier null
    :value #s( :date "2017-09-04"
               :day 9
               :day-of-week Sunday
               :day-of-year 99
               :hour 16
               :kind Local
               :millisecond 721
               :minute 55
               :month 4
               :second 30
               :ticks 636273537307215550
               :time-of-day 16:55:30.7215550
               :year 2017 ) )