Changeset 37410 in project
 Timestamp:
 03/18/19 12:13:06 (17 months ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

wiki/eggref/5/biglists
r37400 r37410 54 54 === Documentation 55 55 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. 56 Note, that the signatures of curried and uncurried versions are listed, 57 but only the uncurried ones are described. 61 58 62 59 ==== biglists … … 66 63 67 64 The 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. 65 documentation for the exported symbol sym. 70 66 71 67 ==== Append 72 68 69 <procedure>(Append xs . xss)</procedure> 70 71 appends all argument lists, provided all but the last 72 are finite 73 73 74 ==== Assoc 74 75 76 <procedure>(Assoc key)</procedure> 77 <procedure>(Assoc key xs)</procedure> 78 79 returns the biglist, whose First or car is Equal? to key 80 75 81 ==== Assp 76 82 83 <procedure>(Assp ok?)</procedure> 84 <procedure>(Assp ok? xs)</procedure> 85 86 returns the biglist, whose First or car passes ok? 87 77 88 ==== Assq 78 89 90 <procedure>(Assq key)</procedure> 91 <procedure>(Assq key xs)</procedure> 92 93 returns the biglist, whose First or car is Eq? to key 94 79 95 ==== Assv 80 96 97 <procedure>(Assv key)</procedure> 98 <procedure>(Assv key xs)</procedure> 99 100 returns the biglist, whose First or car is Eqv? to key 101 81 102 ==== At 82 103 104 <procedure>(At k)</procedure> 105 <procedure>(At k xs)</procedure> 106 107 returns the kth item of xs 108 83 109 ==== BigList? 84 110 111 <procedure>(BigList? xpr)</procedure> 112 113 type predicate 114 85 115 ==== BigList>list 86 116 117 <procedure>(BigList>list xs)</procedure> 118 <procedure>(BigList>list k xs)</procedure> 119 120 transforms a possibly infinite biglist xs into a list 121 87 122 ==== Cons 88 123 124 <macro>(Cons x y finite?)</macro> 125 <macro>(Cons x y)</macro> 126 127 returns either a lazy or an eager biglist 128 89 129 ==== Cycle 90 130 131 <procedure>(Cycle xs)</procedure> 132 133 returns an infinite biglist by appending the finite 134 biglist xs over and over 135 91 136 ==== Cycletimes 92 137 138 <procedure>(Cycle k xs)</procedure> 139 140 returns a finite biglist by appending the finite 141 biglist xs k times 142 93 143 ==== Drop 94 144 145 <procedure>(Drop k)</procedure> 146 <procedure>(Drop k xs)</procedure> 147 148 drops the first k items of xs 149 95 150 ==== Dropwhile 96 151 152 <procedure>(Dropwhile ok?)</procedure> 153 <procedure>(Dropwhile ok? xs)</procedure> 154 155 returns the xs whith those front items x removed 156 which pass ok? 157 97 158 ==== Dropuntil 98 159 160 <procedure>(Dropuntil ok?)</procedure> 161 <procedure>(Dropuntil ok? xs)</procedure> 162 163 returns the xs whith those front items x removed 164 which don't pass ok? 165 99 166 ==== Eager? 100 167 168 <procedure>(Eager? xpr)</procedure> 169 170 is xpr an eager biglist, i.e. a normal list? 171 101 172 ==== Eq? 102 173 174 <procedure>(Eq? xs ys)</procedure> 175 176 returns #t if both lists have same length 177 and corresponding items are eq? 178 103 179 ==== Eqp? 104 180 181 <procedure>(Eqp? =?)</procedure> 182 <procedure>(Eqp? =? xs ys)</procedure> 183 184 returns #t if both lists have same length 185 and corresponding items are =? 186 105 187 ==== Equal? 106 188 189 <procedure>(Equal? xs ys)</procedure> 190 191 returns #t if both lists have same length 192 and corresponding items are equal? 193 107 194 ==== Eqv? 108 195 196 <procedure>(Eqv? xs ys)</procedure> 197 198 returns #t if both lists have same length 199 and corresponding items are eqv? 200 109 201 ==== Every? 110 202 203 <procedure>(Every? ok?)</procedure> 204 <procedure>(Every? ok? xs)</procedure> 205 206 returns #t if every item of the finite biglist xs 207 passes the ok? test 208 111 209 ==== Filter 112 210 211 <procedure>(Filter ok?)</procedure> 212 <procedure>(Filter ok? xs)</procedure> 213 214 removes all items from the biglist xs which 215 do not pass the ok? test 216 113 217 ==== Foldleft 114 218 219 <procedure>(Foldleft op init)</procedure> 220 <procedure>(Foldleft op init . xss)</procedure> 221 222 folds the finite biglists xss from the left 223 115 224 ==== Foldleft0 116 225 226 <procedure>(Foldleft0 op)</procedure> 227 <procedure>(Foldleft0 op . xss)</procedure> 228 229 folds the finite biglists<procedure>(map Rest xss) from the left 230 with init<procedure>(map First xss)</procedure> 231 117 232 ==== Foldright 118 233 234 <procedure>(Foldright op init)</procedure> 235 <procedure>(Foldright op init . xss)</procedure> 236 237 folds the finite biglists xss from the right 238 119 239 ==== Foldright0 120 240 241 <procedure>(Foldright0 op)</procedure> 242 <procedure>(Foldright0 op . xss)</procedure> 243 244 folds the finite biglists<procedure>(map Rest xss) from the right 245 with init<procedure>(map First xss)</procedure> 246 121 247 ==== For 122 248 249 <macro>(For ((var xs ok? ...) ....) item)</macro> 250 251 creates a new list by binding var to each element 252 of the list xs in sequence, and if it passes the checks, 253 ok? ..., inserts item into the result list. 254 The qualifieres, (var xs ok? ...), are processed 255 sequentially from left to right, so that filters of a 256 qualifier have access to the variables of qualifiers 257 to its left. 258 123 259 ==== Foreach 124 260 261 <procedure>(Foreach fn)</procedure> 262 <procedure>(Foreach fn . xss)</procedure> 263 264 applies the procedure fn to each list of items 265 of xss at each commeon index 266 125 267 ==== First 126 268 269 <procedure>(First xs)</procedure> 270 271 returns the front item of xs, which might be eos 272 127 273 ==== Index 128 274 275 <procedure>(Index ok?)</procedure> 276 <procedure>(Index ok? xs)</procedure> 277 278 returns the index of the first item of the biglist xs, 279 which passes the ok? test 280 129 281 ==== Iterate 130 282 283 <procedure>(Iterate fn)</procedure> 284 <procedure>(Iterate fn x)</procedure> 285 286 returns an infinite list by iteratively 287 applying fn to x 288 131 289 ==== Iteratetimes 132 290 291 <procedure>(Iteratetimes fn times)</procedure> 292 <procedure>(Iteratetimes fn times x)</procedure> 293 294 returns a finite list of lentgh times by 295 iteratively applying fn to x 296 133 297 ==== Iterateuntil 134 298 299 <procedure>(Iterateuntil fn ok?)</procedure> 300 <procedure>(Iterateuntil fn ok? x)</procedure> 301 302 returns a finite list by iteratively applying 303 fn to x until ok? returns #t on the result 304 135 305 ==== Iteratewhile 136 306 307 <procedure>(Iteratewhile fn ok?)</procedure> 308 309 returns a finite list by iteratively applying 310 fn to x as long as ok? returns #t on the result 311 137 312 ==== Lazy? 138 313 314 <procedure>(Lazy? xpr)</procedure> 315 316 is xpr a lazy biglist? 317 139 318 ==== Length 140 319 320 <procedure>(Length xs)</procedure> 321 322 retuns the length of a finite biglist or #f 323 of an infinite one 324 141 325 ==== List 142 326 327 <procedure>(List . args)</procedure> 328 329 creates a lazy finite biglist with items args 330 143 331 ==== List? 144 332 333 <procedure>(List? xpr)</procedure> 334 335 is xpr a finite biglist? 336 145 337 ==== Listof? 146 338 339 <procedure>(Listof? . oks?)</procedure> 340 <procedure>(Listof? k . oks?)</procedure> 341 342 returs a predicate on a biglist, which checks, 343 if every item<procedure>(or Take k item) is a finite biglist 344 147 345 ==== Map 148 346 347 <procedure>(Map fn)</procedure> 348 <procedure>(Map fn . xss)</procedure> 349 350 maps every list of of items at fixed index of xss 351 with function fn 352 149 353 ==== Member 150 354 355 <procedure>(Member x)</procedure> 356 <procedure>(Member x xs)</procedure> 357 358 returns the first tail af the biglist xs 359 whose first item is equal? to x 360 151 361 ==== Memp 152 362 363 <procedure>(Memp ok?)</procedure> 364 <procedure>(Memp ok? xs)</procedure> 365 366 returns the first tail af the biglist xs 367 which passes the ok? test 368 153 369 ==== Memq 154 370 371 <procedure>(Memq x)</procedure> 372 <procedure>(Memq x xs)</procedure> 373 374 returns the first tail af the biglist xs 375 whose first item is eqv? to x 376 155 377 ==== Memv 156 378 379 <procedure>(Memv x)</procedure> 380 <procedure>(Memv x xs)</procedure> 381 382 returns the first tail af the biglist xs 383 whose first item is eqv? to x 384 157 385 ==== Merge 158 386 387 <procedure>(Merge <? xs ys)</procedure> 388 389 merges two finite finite biglists xs and ys, 390 both lazy or both eager, with respect to <? 391 159 392 ==== Null? 160 393 394 <procedure>(Null? xs)</procedure> 395 396 is the biglist xs empty? 397 161 398 ==== Print 162 399 400 <procedure>(Print k xs)</procedure> 401 <procedure>(Print xs)</procedure> 402 403 print the items of a finite biglist, 404 or the first k items of an infinite one 405 163 406 ==== Range 164 407 408 <procedure>(Range upto)</procedure> 409 <procedure>(Range from upto)</procedure> 410 <procedure>(Range from upto step)</procedure> 411 412 creates a list of numbers with given limits 413 from defaults to 0 414 step defaults to 1 415 the list is infinite, if utpo is #f 416 165 417 ==== Readforever 166 418 419 <procedure>(Readforever)</procedure> 420 421 creates an infinite biglist of prompted 422 read procedures 423 167 424 ==== Remove 168 425 426 <procedure>(Remove x)</procedure> 427 <procedure>(Remove x xs)</procedure> 428 429 removes all items of the biglist xs, which 430 are equal? to x 431 169 432 ==== Remp 170 433 434 <procedure>(Remp ok?)</procedure> 435 <procedure>(Remp ok? xs)</procedure> 436 437 removes all items of the biglist xs, which 438 pass the ok? test 439 171 440 ==== Remq 172 441 442 <procedure>(Remp x)</procedure> 443 <procedure>(Remp x xs)</procedure> 444 445 removes all items of the biglist xs, which 446 are eq? to x 447 173 448 ==== Remv 174 449 450 <procedure>(Remp x)</procedure> 451 <procedure>(Remp x xs)</procedure> 452 453 removes all items of the biglist xs, which 454 are eqv? to x 455 175 456 ==== Repeat 176 457 458 <procedure>(Repeat x)</procedure> 459 460 returns an infinite biglist with all items x 461 177 462 ==== Repeattimes 178 463 464 <procedure>(Repeattimes k x)</procedure> 465 466 returns a finite biglist of length k with all items x 467 179 468 ==== Rest 180 469 470 <procedure>(Rest xs)</procedure> 471 472 returns the rest of the biglist except the front item 473 181 474 ==== Reverse 182 475 476 <procedure>(Reverse xs)</procedure> 477 <procedure>(Reversee xs ys)</procedure> 478 479 Append the reverse of xs to ys 480 xs must be finite 481 183 482 ==== Reverse* 184 483 484 <procedure>(Reverse* xs)</procedure> 485 486 retrurns the list of reverses of 487 of all finite takes 488 185 489 ==== Scanleft 186 490 491 <procedure>(Scanleft op init)</procedure> 492 <procedure>(Scanleft op init . xss)</procedure> 493 494 returns a biglist, whose item at index k 495 is the left fold of (map (Take k) xss) 496 187 497 ==== Scanright 188 498 499 <procedure>(Scanright op init)</procedure> 500 <procedure>(Scanright op init . xss)</procedure> 501 502 returns a biglist, whose item at index k 503 is the right fold of (map (Take k) xss) 504 189 505 ==== Some? 190 506 507 <procedure>(Some? ok?)</procedure> 508 <procedure>(Some? ok? xs)</procedure> 509 510 returns #t if some item of the finite biglist xs 511 passes the ok? test 512 191 513 ==== Sort 192 514 515 <procedure>(Sort <?)</procedure> 516 <procedure>(Sort <? xs)</procedure> 517 518 sorts the finite biglist xs with respect to <? 519 193 520 ==== Sorted? 194 521 522 <procedure>(Sorted? <?)</procedure> 523 <procedure>(Sorted? <? xs)</procedure> 524 525 is the biglist xs finite and sorted? 526 195 527 ==== Take 196 528 529 <procedure>(Take k)</procedure> 530 <procedure>(Take k xs)</procedure> 531 532 returns the finite biglist of the first 533 k items of the biglist xs 534 197 535 ==== Takeuntil 198 536 537 <procedure>(Takeuntil ok?)</procedure> 538 <procedure>(Takeuntil ok? xs)</procedure> 539 540 returns the finite biglist of the first 541 items of the biglist xs, which do not pass 542 the ok? test 543 199 544 ==== Takewhile 200 545 546 <procedure>(Takewhile ok?)</procedure> 547 <procedure>(Takewhile ok? xs)</procedure> 548 549 returns the finite biglist of the first 550 items of the biglist xs, which do pass 551 the ok? test 552 201 553 ==== Unzip 202 554 555 <procedure>(Unzip xs)</procedure> 556 557 returns two values, the sublists of biglist xs 558 of even or uneven index 559 203 560 ==== Zip 204 561 562 <procedure>(Zip xs ys)</procedure> 563 564 merges the biglists xs and ys by alternatively 565 Consing (First xs) or (First ys) to the result 566 biglist. Works for unfinite biglists as well. 567 205 568 ==== eos 569 570 endofsequence indicator 206 571 207 572 === Dependencies
Note: See TracChangeset
for help on using the changeset viewer.