Tried a code snippet with Gambit 4.7.4 on my iPhone and got an unbound variable error for filter. I noticed the same thing on my laptop’s version (4.8.9). Dybvig’s 4th edition of The Scheme Programming Language lists filter as part of the language on page 164.
Why does it not exist in Gambit Scheme?
Afficher les réponses par date
“filter” is not part of the R4RS or R5RS scheme standards, which Gambit implements. It appears that Marc is rapidly adding routines to Gambit to make it R7RS compliant, but I don’t see a “filter” routine in R7RS-small.
“Filter” is implemented in SRFI-1, and there is port of SRFI-1 to Gambit in the “Dumping Grounds”:
http://dynamo.iro.umontreal.ca/wiki/index.php/Dumping_Grounds
Perhaps this would be of help.
Brad
On Feb 10, 2019, at 12:46 PM, Steve Graham jsgrahamus@yahoo.com wrote:
Tried a code snippet with Gambit 4.7.4 on my iPhone and got an unbound variable error for filter. I noticed the same thing on my laptop’s version (4.8.9). Dybvig’s 4th edition of The Scheme Programming Language lists filter as part of the language on page 164.
Why does it not exist in Gambit Scheme? _______________________________________________ Gambit-list mailing list Gambit-list@iro.umontreal.ca https://mailman.iro.umontreal.ca/cgi-bin/mailman/listinfo/gambit-list
On Sun, Feb 10, 2019 at 11:56 PM Bradley Lucier lucier@math.purdue.edu wrote:
“filter” is not part of the R4RS or R5RS scheme standards, which Gambit
implements. It appears that Marc is rapidly adding routines to Gambit to make it R7RS compliant, but I don’t see a “filter” routine in R7RS-small.
“Filter” is implemented in SRFI-1, and there is port of SRFI-1 to Gambit in the “Dumping Grounds”:
Right. The only SRFI-1 procedures added to R7RS-small are `make-list` and `list-copy`, based on the corresponding vector and string procedures. In addition, some others were slightly changed for SRFI 1 compatibility: e.g. R7RS-small `map` is specified to stop when one of the list arguments is exhausted, whereas in R5RS it was an error to provide lists of different lengths.