Hi! Ian Price <ianpric...@googlemail.com> skribis:
> I want to propose the addition of four procedures to guile's (ice-9 > boot-9) aka "core guile": fold, fold-right, shuffle, and perhaps > shuffle!. I can provide patches myself, or one of you handsome people > can do it for me :) Noooo! :-) While I often end up importing srfi-1, srfi-26, and (ice-9 match) for any code I write, I’m happy they live in their own modules. I think there are too many, rather than too few, bindings in (guile). Module separation is great: it avoids name clashes (and allows one to use #:renamer or #:select), and follows the principle of least authority (granting programs only what they explicitly asked for.) > shuffle and shuffle! are two procedures that are conspicuously absent > from anywhere guile, and that I have probably reinvented every two > months or so. I'd suggest a traditional knuth shuffle, and copying for > the nondestructive version, though Riastradh has a selection of > shuffles[1] we could use. Oleg Kiselyov also suggests a purely > functional implementation[2]. What about adding an (ice-9 shuffle) module? > 0. Incidentally, char-set-unfold!, char-set-unfold, char-set-fold, > string-unfold-right, string-unfold, string-fold-right, string-fold and > hash-fold _are_ in the base, and this is supposed to be list processing > language.</flamebait> Yes, but that’s for Historical Reasons™. Thanks, Ludo’.