This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki CyclicListsCowan version 1

author

cowan

comment


    

ipnr

98.14.172.204

name

CyclicListsCowan

readonly

0

text

== Circular lists ==

`(encycle! `''list''` `''head-size''` `''cycle-size''`)`

''Head-size'' and ''cycle-size'' MUST be exact non-negative integers. The (possibly improper) ''list'' MUST contain at least ''head-size'' + ''cycle-size'' pairs.  If ''cycle-size'' = 0, does nothing. If ''cycle-size'' > 0, mutates ''list'' to have a cyclic prefix of length ''head-size'' and cycle length ''cycle-size'', by setting the `cdr` of the (''head-size'' + ''cycle-size'')th pair in the list to refer to the (''head-size''+ 1)th pair in the list.  Returns unspecified values.

What else should go here depends on what WG1 decides to do about circular lists generally.

time

2010-09-27 01:11:59

version

1