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 > (as-prototype date-time:T)
it: #s( :max-value "9999-12-31 23:59:59"
        :min-value "0001-01-01"
        :now "2017-08-20 17:01:05"
        :today "2017-20-08"
        :utc-now "2017-08-20 15:01:05" )
user > :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-08-20 17:01:05"
               :today "2017-20-08"
               :utc-now "2017-08-20 15:01:05" ) )

user > (as-prototype (date-time:now))
it: #s( :date "2017-20-08"
        :day 20
        :day-of-week Sunday
        :day-of-year 232
        :hour 17
        :kind Local
        :millisecond 41
        :minute 1
        :month 8
        :second 5
        :ticks 636388452650416970
        :time-of-day 17:01:05.0416970
        :year 2017 )
user > :d
#s( :type "Kiezel.Prototype"
    :type-specifier null
    :value #s( :date "2017-20-08"
               :day 20
               :day-of-week Sunday
               :day-of-year 232
               :hour 17
               :kind Local
               :millisecond 41
               :minute 1
               :month 8
               :second 5
               :ticks 636388452650416970
               :time-of-day 17:01:05.0416970
               :year 2017 ) )