From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julian Graham Newsgroups: gmane.lisp.guile.devel Subject: low-hanging SRFI fruit (SRFI-98) Date: Tue, 26 May 2009 22:43:38 -0400 Message-ID: <2bc5f8210905261943m3b0a090cm3839b11f442060d4@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=0016e6ddab328059ae046adbcfd2 X-Trace: ger.gmane.org 1243392233 28553 80.91.229.12 (27 May 2009 02:43:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 May 2009 02:43:53 +0000 (UTC) To: guile-devel Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Wed May 27 04:43:51 2009 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M997N-00074W-EO for guile-devel@m.gmane.org; Wed, 27 May 2009 04:43:49 +0200 Original-Received: from localhost ([127.0.0.1]:56019 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M997M-000388-Ti for guile-devel@m.gmane.org; Tue, 26 May 2009 22:43:48 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M997K-00037t-Cc for guile-devel@gnu.org; Tue, 26 May 2009 22:43:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M997E-00037h-4M for guile-devel@gnu.org; Tue, 26 May 2009 22:43:45 -0400 Original-Received: from [199.232.76.173] (port=43111 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M997E-00037e-0y for guile-devel@gnu.org; Tue, 26 May 2009 22:43:40 -0400 Original-Received: from mail-ew0-f162.google.com ([209.85.219.162]:52617) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M997D-0003ns-LB for guile-devel@gnu.org; Tue, 26 May 2009 22:43:39 -0400 Original-Received: by ewy6 with SMTP id 6so4437610ewy.42 for ; Tue, 26 May 2009 19:43:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=UjfC5NByANLG+tzyhvOoKx8ZZPUZ6lRXvZPQSoy/DTM=; b=LpQmrSAxnEFXvLHulLqoy0E+GAkF+bMHdQbattCimakaoUnAba+I42r+aQQHQILItn gJeDo09sKmqnv5MSTLAuXhTvo+qjf9GiSSPGGt2hORUMaELIXToVxreS8iM9tFWy8Ng3 ikiJA2QqVuD0r6G3tdZV/5WanwhqJyi9FBATU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=fzAG4qrFxlvd2dsmlgMdSjZnOYO89tOT9T0RFM/9fk+1ADDb0/Peo4W9x/6RTSK2ct AnCeLDgNQoi5pDcl37X7ZWKPi/ejmjvEax/3SH0T9Bn7vxncBs8NwdWNFWhLwEYxBnKu ezjfDhe2zoTRKwIAcQwJRM8oQ9D6PmxcMhTko= Original-Received: by 10.216.51.202 with SMTP id b52mr3502052wec.38.1243392218519; Tue, 26 May 2009 19:43:38 -0700 (PDT) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:8533 Archived-At: --0016e6ddab328059ae046adbcfd2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Guilers, While looking over the prerequisites for the proposed SRFI-100, I came across SRFI-98, which seemed like pretty easy win for Guile. So I did a quick implementation on the subway -- find it attached. I'll write up unit tests and docs if people think it's suitable for integration. Regards, Julian --0016e6ddab328059ae046adbcfd2 Content-Type: text/x-scheme; charset=US-ASCII; name="srfi-98.scm" Content-Disposition: attachment; filename="srfi-98.scm" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fv7fl65m0 Ozs7IHNyZmktOTguc2NtIC0tLSBBbiBpbnRlcmZhY2UgdG8gYWNjZXNzIGVudmlyb25tZW50IHZh cmlhYmxlcwoKOzsgQ29weXJpZ2h0IChDKSAyMDA5IEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbiwg SW5jLgo7Owo7OyBUaGlzIGxpYnJhcnkgaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3Ry aWJ1dGUgaXQgYW5kL29yCjs7IG1vZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBM ZXNzZXIgR2VuZXJhbCBQdWJsaWMKOzsgTGljZW5zZSBhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUg U29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyCjs7IHZlcnNpb24gMi4xIG9mIHRoZSBMaWNlbnNl LCBvciAoYXQgeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgo7OyAKOzsgVGhpcyBsaWJy YXJ5IGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCjs7 IGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJh bnR5IG9mCjs7IE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVS UE9TRS4gIFNlZSB0aGUgR05VCjs7IExlc3NlciBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBt b3JlIGRldGFpbHMuCjs7IAo7OyBZb3Ugc2hvdWxkIGhhdmUg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