14 Generators (short names)
(require (planet untyped/unlib/gen)) |
This module re-provides the procedures from "generator.ss" with shorter, more convenient names. See Generators for more detailed documentation.
g:end : symbol? |
Shorter name for generator-end.
(g:end? item) → boolean? |
item : any |
Shorter name for generator-end?.
(gen-> value-contract) → flat-contract? |
value-contract : flat-contract? |
(list->generator lis) → (gen-> a) |
lis : (listof a) |
fn : (arg1 arg2 ... -> ans) |
gen1 : (gen-> arg1) |
gen2 : (gen-> arg2) |
Shorter name for generator-map.
(g:fold-map fn initial-seed gen1 gen2 ) → seed |
fn : (arg1 arg2 ... seed -> seed) |
initial-seed : seed |
gen1 : (gen-> arg1) |
gen2 : (gen-> arg2) |
Shorter name for generator-fold-map.
pred : (arg -> boolean?) |
src : (gen-> arg) |
Shorter name for generator-filter.
(g:filter-map fn src) → (gen-> ans) |
fn : (arg -> (U ans #f)) |
src : (gen-> arg) |
Shorter name for generator-filter-map.
(g:remove-duplicates src [same?]) → (gen-> a) |
src : (gen-> a) |
same? : (a a -> boolean?) = equal? |
Shorter name for generator-remove-duplicates.
(g:for-each fn gen1 gen2 ) → void? |
fn : (arg1 arg2 ... -> void) |
gen1 : (gen-> arg1) |
gen2 : (gen-> arg2) |
Shorter name for generator-for-each
(g:fold fn initial-seed gen1 gen2 ) → seed |
fn : (arg1 arg2 ... seed -> seed) |
initial-seed : seed |
gen1 : (gen-> arg1) |
gen2 : (gen-> arg2) |
Shorter name for generator-fold
(g:collect src) → (listof a) |
src : (gen-> a) |
Shorter name for generator-fold.
(g:project mask src [same?]) |
→ (gen-> (list any ... (listof (listof any)))) |
mask : (listof boolean) |
src : (gen-> (listof any)) |
same? : [(any any -> boolean)] = eq? |
Shorter name for generator-project
message : string? |
src : (gen-> a) |
Shorter name for generator-debug.