{"size": 1309, "ext": "scrbl", "max_stars_repo_path": "doc/sagittarius/object.scrbl", "max_stars_repo_name": "david135/sagittarius-scheme", "max_stars_repo_stars_event_min_datetime": "2015-11-07T07:13:35.000Z", "max_stars_repo_stars_event_max_datetime": "2022-02-15T03:35:14.000Z", "max_issues_repo_path": "doc/sagittarius/object.scrbl", "max_issues_repo_name": "david135/sagittarius-scheme", "max_issues_repo_issues_event_min_datetime": "2016-04-28T21:59:59.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-01T08:42:21.000Z", "max_forks_repo_path": "doc/sagittarius/object.scrbl", "max_forks_repo_name": "david135/sagittarius-scheme", "max_forks_repo_forks_event_min_datetime": "2016-12-28T12:41:23.000Z", "max_forks_repo_forks_event_max_datetime": "2020-02-26T20:52:02.000Z"}
{"max_stars_count": 39, "max_issues_count": 3, "max_forks_count": 4, "avg_line_length": 31.1666666667, "max_line_length": 106, "alphanum_fraction": 0.7242169595}
@; -*- coding: utf-8; -*-
@subsection[:tag "lib.sagittarius.object"]{(sagittarius object) - Convenient refs and coercion procedures}

@define[Library]{@name{(sagittarius object)}}
@desc{This library provides convenient procedures.
}

@define[Generic]{@name{ref} @args{object key args @dots{}}}
@define[Generic]{@name{(setter ref)} @args{object key value}}
@desc{Returns given @var{object}'s values associated with @var{key}. The default
implementation uses @code{slot-ref}.

Following classes are specialised by default.
@itemlist{
 @item{@code{<hashtable>} uses @code{hashtable-ref}}
 @item{@code{<list>} uses @code{list-ref}}
 @item{@code{<string>} uses @code{string-ref}}
 @item{@code{<vector>} uses @code{vector-ref}}
}

}

@define[Generic]{@name{->string} @args{object}}
@desc{Returns string represented @var{object}.}

@define[Generic]{@name{->integer} @args{object}}
@desc{Returns integer represented @var{object}.}

@define[Generic]{@name{->number} @args{object}}
@desc{Returns number represented @var{object}.

The default value is 0.

If the given @var{object} is number, it returns given object itself. 

If the given @var{object} is string, it uses @code{string->number} as a
conversion procedure.

If the given @var{object} is character, it uses @code{char->integer} as a
conversion procedure.
}
