www.delorie.com/gnu/docs/guile/guile_473.html   search  
 
Buy GNU books!


Guile Reference Manual

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

39.11.12 Fold/Unfold/Map

string-map, string-for-each etc. are for iterating over the characters a string is composed of. The fold and unfold procedures are list iterators and constructors.

Scheme Procedure: string-map proc s [start end]
proc is a char->char procedure, it is mapped over s. The order in which the procedure is applied to the string elements is not specified.

Scheme Procedure: string-map! proc s [start end]
proc is a char->char procedure, it is mapped over s. The order in which the procedure is applied to the string elements is not specified. The string s is modified in-place, the return value is not specified.

Scheme Procedure: string-fold kons knil s [start end]
Scheme Procedure: string-fold-right kons knil s [start end]
Fold kons over the characters of s, with knil as the terminating element, from left to right (or right to left, for string-fold-right). kons must expect two arguments: The actual character and the last result of kons' application.

Scheme Procedure: string-unfold p f g seed [base make_final]
Scheme Procedure: string-unfold-right p f g seed [base make_final]
These are the fundamental string constructors.

Scheme Procedure: string-for-each proc s [start end]
proc is mapped over s in left-to-right order. The return value is not specified.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003