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-10-09 17:29:58"
        :today "2017-09-10"
        :utc-now "2017-10-09 15:29:58" )
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-10-09 17:29:58"
               :today "2017-09-10"
               :utc-now "2017-10-09 15:29:58" ) )

user > (as-prototype (date-time:now))
it: #s( :date "2017-09-10"
        :day 9
        :day-of-week Monday
        :day-of-year 282
        :hour 17
        :kind Local
        :millisecond 249
        :minute 29
        :month 10
        :second 58
        :ticks 636431669982494130
        :time-of-day 17:29:58.2494130
        :year 2017 )
user > :d
#s( :type "Kiezel.Prototype"
    :type-specifier null
    :value #s( :date "2017-09-10"
               :day 9
               :day-of-week Monday
               :day-of-year 282
               :hour 17
               :kind Local
               :millisecond 249
               :minute 29
               :month 10
               :second 58
               :ticks 636431669982494130
               :time-of-day 17:29:58.2494130
               :year 2017 ) )