Changeset 37131 in project


Ignore:
Timestamp:
01/26/19 16:08:08 (3 weeks ago)
Author:
iraikov
Message:

added collections doc to yasos page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/5/yasos

    r36442 r37131  
    528528=== Module yasos-stacks
    529529
    530 an implementation of random-acces stacks
     530An implementation of random-acces stacks
    531531
    532532==== make-stack
     
    696696<procedure>(translate! obj dx dy)</procedure>
    697697
     698=== Module yasos-collections
     699
     700Generic interface to finite-size collections.
     701
     702
     703==== collection?
     704
     705==== collection?
     706
     707<procedure>(collection? obj)</procedure>
     708
     709Predicate -- true for lists, vectors, strings, and has tables.
     710
     711==== empty?
     712
     713<procedure>(empty? collection)</procedure>
     714
     715Returns true if collection is empty, false otherwise.
     716
     717==== size
     718
     719<procedure>(size collection)</procedure>
     720
     721Returns the size of the collection.
     722
     723==== do-elts and do-keys
     724
     725<procedure>(do-elts collection ...)</procedure>
     726
     727Applies procedure element-wise to collections. Return value is unspecified.
     728
     729<procedure>(do-keys collection ...)</procedure>
     730
     731Applies procedure element-wise to collection indices or keys. Return value is unspecified.
     732
     733==== map-elts and map-keys
     734
     735<procedure>(map-elts collection ...)</procedure>
     736
     737Applies procedure element-wise to collections and maps to new collection.
     738
     739<procedure>(map-keys collection ...)</procedure>
     740
     741Applies procedure element-wise to collection indices or keys and maps to new collection.
     742
     743==== for-each-key and for-each-elt
     744
     745<procedure>(for-each-key collection proc)</procedure>
     746<procedure>(for-each-elt collection proc)</procedure>
     747
     748Applies proc to single collection (more efficient).
     749
     750==== gen-keys and gen-elts
     751
     752<procedure>(gen-keys collection proc)</procedure>
     753<procedure>(gen-elts collection proc)</procedure>
     754
     755Returns generators for collection indices/keys and values, respectively.
     756
     757==== reduce
     758
     759<procedure>(reduce proc seed collection ...)</procedure>
     760
     761Fold iterator for collections.
     762
     763<procedure>(reduce* proc collection ...)</procedure>
     764
     765Fold iterator for collections where the first element of the collection is the seed.
     766
     767==== random-access?
     768
     769<procedure>(random-access? collection)</procedure>
     770
     771Returns true if collection permits random access, i.e. if elt-ref and
     772elt-set! are defined operations, false otherwise.
     773
     774==== elt-ref and elt-set!
     775
     776<procedure>(elt-ref collection i)</procedure>
     777
     778<procedure>(elt-set! collection i v)</procedure>
     779
     780Random-access collection get and set, respectively.
     781
     782==== sort!
     783
     784<procedure>(sort elt< collection)</procedure>
     785
     786Merge sort for collections.
     787
    698788=== Author
    699789
     
    706796
    707797[[/users/juergen-lorenz|Juergen Lorenz]]
     798[[/users/ivan-raikov|Ivan Raikov]]
    708799
    709800=== License
     
    733824=== Changelog
    734825
     826; 1.10 : added g-zip (generator zip) utility to module yasos-collections
    735827; 1.8 : additional operations and generator combinators in module yasos-collections
    736828; 1.7 : renamed yasos-based modules to yasos-<name> to avoid collisions with other eggs
Note: See TracChangeset for help on using the changeset viewer.