From 4e2becb6426579b988e34cb78ed526f1a4b1400c Mon Sep 17 00:00:00 2001 From: stibear Date: Mon, 10 Feb 2014 23:20:20 +0900 Subject: [PATCH] implemented Miscellaneous completely --- piclib/srfi/1.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/piclib/srfi/1.scm b/piclib/srfi/1.scm index 23456e00..bc257e9f 100644 --- a/piclib/srfi/1.scm +++ b/piclib/srfi/1.scm @@ -245,6 +245,12 @@ (map third list) (map fourth list) (map fifth list))) + + (define (count pred . clists) + (let rec ((tflst (apply map pred clists)) (n 0)) + (if (null? tflst) + n + (rec (cdr tflst) (if (car tflst) (+ n 1) n))))) (export length length+ append append! concatenate concatenate!