Changeset 37410 in project


Ignore:
Timestamp:
03/18/19 12:13:06 (21 months ago)
Author:
juergen
Message:

biglists docu updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/biglists

    r37400 r37410  
    5454=== Documentation
    5555
    56 At present, except the documentation procedure, biglists, this file only
    57 lists the names of the exported symbols. There documentation can be
    58 shown offline with (biglists sym).
    59 
    60 Offline documentation is provided in all of my eggs.
     56Note, that the signatures of curried and uncurried versions are listed,
     57but only the uncurried ones are described.
    6158
    6259==== biglists
     
    6663
    6764The first call returns the list of exported symbols, the second
    68 documentation for the exported symbol sym. But note, that only the
    69 uncurried version is explained, while both signatures are noted.
     65documentation for the exported symbol sym.
    7066
    7167==== Append
    7268
     69<procedure>(Append xs . xss)</procedure>
     70
     71appends all argument lists, provided all but the last
     72are finite
     73
    7374==== Assoc
    7475
     76<procedure>(Assoc key)</procedure>
     77<procedure>(Assoc key xs)</procedure>
     78
     79returns the biglist, whose First or car is Equal? to key
     80
    7581==== Assp
    7682
     83<procedure>(Assp ok?)</procedure>
     84<procedure>(Assp ok? xs)</procedure>
     85
     86returns the biglist, whose First or car passes ok?
     87
    7788==== Assq
    7889
     90<procedure>(Assq key)</procedure>
     91<procedure>(Assq key xs)</procedure>
     92
     93returns the biglist, whose First or car is Eq? to key
     94
    7995==== Assv
    8096
     97<procedure>(Assv key)</procedure>
     98<procedure>(Assv key xs)</procedure>
     99
     100returns the biglist, whose First or car is Eqv? to key
     101
    81102==== At
    82103
     104<procedure>(At k)</procedure>
     105<procedure>(At k xs)</procedure>
     106
     107returns the kth item of xs
     108
    83109==== BigList?
    84110
     111<procedure>(BigList? xpr)</procedure>
     112
     113type predicate
     114
    85115==== BigList->list
    86116
     117<procedure>(BigList->list xs)</procedure>
     118<procedure>(BigList->list k xs)</procedure>
     119
     120transforms a possibly infinite biglist xs into a list
     121
    87122==== Cons
    88123
     124<macro>(Cons x y finite?)</macro>
     125<macro>(Cons x y)</macro>
     126
     127returns either a lazy or an eager biglist
     128
    89129==== Cycle
    90130
     131<procedure>(Cycle xs)</procedure>
     132
     133returns an infinite biglist by appending the finite
     134biglist xs over and over
     135
    91136==== Cycle-times
    92137
     138<procedure>(Cycle k xs)</procedure>
     139
     140returns a finite biglist by appending the finite
     141biglist xs k times
     142
    93143==== Drop
    94144
     145<procedure>(Drop k)</procedure>
     146<procedure>(Drop k xs)</procedure>
     147
     148drops the first k items of xs
     149
    95150==== Drop-while
    96151
     152<procedure>(Drop-while ok?)</procedure>
     153<procedure>(Drop-while ok? xs)</procedure>
     154
     155returns the xs whith those front items x removed
     156which pass ok?
     157
    97158==== Drop-until
    98159
     160<procedure>(Drop-until ok?)</procedure>
     161<procedure>(Drop-until ok? xs)</procedure>
     162
     163returns the xs whith those front items x removed
     164which don't pass ok?
     165
    99166==== Eager?
    100167
     168<procedure>(Eager? xpr)</procedure>
     169
     170is xpr an eager biglist, i.e. a normal list?
     171
    101172==== Eq?
    102173
     174<procedure>(Eq? xs ys)</procedure>
     175
     176returns #t if both lists have same length
     177and corresponding items are eq?
     178
    103179==== Eqp?
    104180
     181<procedure>(Eqp? =?)</procedure>
     182<procedure>(Eqp? =? xs ys)</procedure>
     183
     184returns #t if both lists have same length
     185and corresponding items are =?
     186
    105187==== Equal?
    106188
     189<procedure>(Equal? xs ys)</procedure>
     190
     191returns #t if both lists have same length
     192and corresponding items are equal?
     193
    107194==== Eqv?
    108195
     196<procedure>(Eqv? xs ys)</procedure>
     197
     198returns #t if both lists have same length
     199and corresponding items are eqv?
     200
    109201==== Every?
    110202
     203<procedure>(Every? ok?)</procedure>
     204<procedure>(Every? ok? xs)</procedure>
     205
     206returns #t if every item of the finite biglist xs
     207passes the ok? test
     208
    111209==== Filter
    112210
     211<procedure>(Filter ok?)</procedure>
     212<procedure>(Filter ok? xs)</procedure>
     213
     214removes all items from the biglist xs which
     215do not pass the ok? test
     216
    113217==== Fold-left
    114218
     219<procedure>(Fold-left op init)</procedure>
     220<procedure>(Fold-left op init . xss)</procedure>
     221
     222folds the finite biglists xss from the left
     223
    115224==== Fold-left0
    116225
     226<procedure>(Fold-left0 op)</procedure>
     227<procedure>(Fold-left0 op . xss)</procedure>
     228
     229folds the finite biglists<procedure>(map Rest xss) from the left
     230with init<procedure>(map First xss)</procedure>
     231
    117232==== Fold-right
    118233
     234<procedure>(Fold-right op init)</procedure>
     235<procedure>(Fold-right op init . xss)</procedure>
     236
     237folds the finite biglists xss from the right
     238
    119239==== Fold-right0
    120240
     241<procedure>(Fold-right0 op)</procedure>
     242<procedure>(Fold-right0 op . xss)</procedure>
     243
     244folds the finite biglists<procedure>(map Rest xss) from the right
     245with init<procedure>(map First xss)</procedure>
     246
    121247==== For
    122248
     249<macro>(For ((var xs ok? ...) ....) item)</macro>
     250
     251creates a new list by binding var to each element
     252of the list xs in sequence, and if it passes the checks,
     253ok? ..., inserts item into the result list.
     254The qualifieres, (var xs ok? ...), are processed
     255sequentially from left to right, so that filters of a
     256qualifier have access to the variables of qualifiers
     257to its left.
     258
    123259==== For-each
    124260
     261<procedure>(For-each fn)</procedure>
     262<procedure>(For-each fn . xss)</procedure>
     263
     264applies the procedure fn to each list of items
     265of xss at each commeon index
     266
    125267==== First
    126268
     269<procedure>(First xs)</procedure>
     270
     271returns the front item of xs, which might be eos
     272
    127273==== Index
    128274
     275<procedure>(Index ok?)</procedure>
     276<procedure>(Index ok? xs)</procedure>
     277
     278returns the index of the first item of the biglist xs,
     279which passes the ok? test
     280
    129281==== Iterate
    130282
     283<procedure>(Iterate fn)</procedure>
     284<procedure>(Iterate fn x)</procedure>
     285
     286returns an infinite list by iteratively
     287applying fn to x
     288
    131289==== Iterate-times
    132290
     291<procedure>(Iterate-times fn times)</procedure>
     292<procedure>(Iterate-times fn times x)</procedure>
     293
     294returns a finite list of lentgh times by
     295iteratively applying fn to x
     296
    133297==== Iterate-until
    134298
     299<procedure>(Iterate-until fn ok?)</procedure>
     300<procedure>(Iterate-until fn ok? x)</procedure>
     301
     302returns a finite list by iteratively applying
     303fn to x until ok? returns #t on the result
     304
    135305==== Iterate-while
    136306
     307<procedure>(Iterate-while fn ok?)</procedure>
     308
     309returns a finite list by iteratively applying
     310fn to x as long as ok? returns #t on the result
     311
    137312==== Lazy?
    138313
     314<procedure>(Lazy? xpr)</procedure>
     315
     316is xpr a lazy biglist?
     317
    139318==== Length
    140319
     320<procedure>(Length xs)</procedure>
     321
     322retuns the length of a finite biglist or #f
     323of an infinite one
     324
    141325==== List
    142326
     327<procedure>(List . args)</procedure>
     328
     329creates a lazy finite biglist with items args
     330
    143331==== List?
    144332
     333<procedure>(List? xpr)</procedure>
     334
     335is xpr a finite biglist?
     336
    145337==== List-of?
    146338
     339<procedure>(List-of? . oks?)</procedure>
     340<procedure>(List-of? k . oks?)</procedure>
     341
     342returs a predicate on a biglist, which checks,
     343if every item<procedure>(or Take k item) is a finite biglist
     344
    147345==== Map
    148346
     347<procedure>(Map fn)</procedure>
     348<procedure>(Map fn . xss)</procedure>
     349
     350maps every list of of items at fixed index of xss
     351with function fn
     352
    149353==== Member
    150354
     355<procedure>(Member x)</procedure>
     356<procedure>(Member x xs)</procedure>
     357
     358returns the first tail af the biglist xs
     359whose first item is equal? to x
     360
    151361==== Memp
    152362
     363<procedure>(Memp ok?)</procedure>
     364<procedure>(Memp ok? xs)</procedure>
     365
     366returns the first tail af the biglist xs
     367which passes the ok? test
     368
    153369==== Memq
    154370
     371<procedure>(Memq x)</procedure>
     372<procedure>(Memq x xs)</procedure>
     373
     374returns the first tail af the biglist xs
     375whose first item is eqv? to x
     376
    155377==== Memv
    156378
     379<procedure>(Memv x)</procedure>
     380<procedure>(Memv x xs)</procedure>
     381
     382returns the first tail af the biglist xs
     383whose first item is eqv? to x
     384
    157385==== Merge
    158386
     387<procedure>(Merge <? xs ys)</procedure>
     388
     389merges two finite finite biglists xs and ys,
     390both lazy or both eager, with respect to <?
     391
    159392==== Null?
    160393
     394<procedure>(Null? xs)</procedure>
     395
     396is the biglist xs empty?
     397
    161398==== Print
    162399
     400<procedure>(Print k xs)</procedure>
     401<procedure>(Print xs)</procedure>
     402
     403print the items of a finite biglist,
     404or the first k items of an infinite one
     405
    163406==== Range
    164407
     408<procedure>(Range upto)</procedure>
     409<procedure>(Range from upto)</procedure>
     410<procedure>(Range from upto step)</procedure>
     411
     412creates a list of numbers with given limits
     413from defaults to 0
     414step defaults to 1
     415the list is infinite, if utpo is #f
     416
    165417==== Read-forever
    166418
     419<procedure>(Read-forever)</procedure>
     420
     421creates an infinite biglist of prompted
     422read procedures
     423
    167424==== Remove
    168425
     426<procedure>(Remove x)</procedure>
     427<procedure>(Remove x xs)</procedure>
     428
     429removes all items of the biglist xs, which
     430are equal? to x
     431
    169432==== Remp
    170433
     434<procedure>(Remp ok?)</procedure>
     435<procedure>(Remp ok? xs)</procedure>
     436
     437removes all items of the biglist xs, which
     438pass the ok? test
     439
    171440==== Remq
    172441
     442<procedure>(Remp x)</procedure>
     443<procedure>(Remp x xs)</procedure>
     444
     445removes all items of the biglist xs, which
     446are eq? to x
     447
    173448==== Remv
    174449
     450<procedure>(Remp x)</procedure>
     451<procedure>(Remp x xs)</procedure>
     452
     453removes all items of the biglist xs, which
     454are eqv? to x
     455
    175456==== Repeat
    176457
     458<procedure>(Repeat x)</procedure>
     459
     460returns an infinite biglist with all items x
     461
    177462==== Repeat-times
    178463
     464<procedure>(Repeat-times k x)</procedure>
     465
     466returns a finite biglist of length k with all items x
     467
    179468==== Rest
    180469
     470<procedure>(Rest xs)</procedure>
     471
     472returns the rest of the biglist except the front item
     473
    181474==== Reverse
    182475
     476<procedure>(Reverse xs)</procedure>
     477<procedure>(Reversee xs ys)</procedure>
     478
     479Append the reverse of xs to ys
     480xs must be finite
     481
    183482==== Reverse*
    184483
     484<procedure>(Reverse* xs)</procedure>
     485
     486retrurns the list of reverses of
     487of all finite takes
     488
    185489==== Scan-left
    186490
     491<procedure>(Scan-left op init)</procedure>
     492<procedure>(Scan-left op init . xss)</procedure>
     493
     494returns a biglist, whose item at index k
     495is the left fold of (map (Take k) xss)
     496
    187497==== Scan-right
    188498
     499<procedure>(Scan-right op init)</procedure>
     500<procedure>(Scan-right op init . xss)</procedure>
     501
     502returns a biglist, whose item at index k
     503is the right fold of (map (Take k) xss)
     504
    189505==== Some?
    190506
     507<procedure>(Some? ok?)</procedure>
     508<procedure>(Some? ok? xs)</procedure>
     509
     510returns #t if some item of the finite biglist xs
     511passes the ok? test
     512
    191513==== Sort
    192514
     515<procedure>(Sort <?)</procedure>
     516<procedure>(Sort <? xs)</procedure>
     517
     518sorts the finite biglist xs with respect to <?
     519
    193520==== Sorted?
    194521
     522<procedure>(Sorted? <?)</procedure>
     523<procedure>(Sorted? <? xs)</procedure>
     524
     525is the biglist xs finite and sorted?
     526
    195527==== Take
    196528
     529<procedure>(Take k)</procedure>
     530<procedure>(Take k xs)</procedure>
     531
     532returns the finite biglist of the first
     533k items of the biglist xs
     534
    197535==== Take-until
    198536
     537<procedure>(Take-until ok?)</procedure>
     538<procedure>(Take-until ok? xs)</procedure>
     539
     540returns the finite biglist of the first
     541items of the biglist xs, which do not pass
     542the ok? test
     543
    199544==== Take-while
    200545
     546<procedure>(Take-while ok?)</procedure>
     547<procedure>(Take-while ok? xs)</procedure>
     548
     549returns the finite biglist of the first
     550items of the biglist xs, which do pass
     551the ok? test
     552
    201553==== Unzip
    202554
     555<procedure>(Unzip xs)</procedure>
     556
     557returns two values, the sublists of biglist xs
     558of even or uneven index
     559
    203560==== Zip
    204561
     562<procedure>(Zip xs ys)</procedure>
     563
     564merges the biglists xs and ys by alternatively
     565Consing (First xs) or (First ys) to the result
     566biglist. Works for unfinite biglists as well.
     567
    205568==== eos
     569
     570end-of-sequence indicator
    206571
    207572=== Dependencies
Note: See TracChangeset for help on using the changeset viewer.