From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: swedebugia@riseup.net Newsgroups: gmane.lisp.guile.user Subject: Help with lambda-procedure Date: Sun, 16 Dec 2018 11:48:45 -0800 Message-ID: <9821320835493e75e12418c00796312c@riseup.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=_1b98ee377c7f418a840f797475c62ca4" X-Trace: blaine.gmane.org 1544990264 30559 195.159.176.226 (16 Dec 2018 19:57:44 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Dec 2018 19:57:44 +0000 (UTC) To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Sun Dec 16 20:57:40 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gYcXi-0007nx-Vs for guile-user@m.gmane.org; Sun, 16 Dec 2018 20:57:39 +0100 Original-Received: from localhost ([::1]:43608 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYcZp-0007Ov-NA for guile-user@m.gmane.org; Sun, 16 Dec 2018 14:59:49 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gYcZ3-0007D5-36 for guile-user@gnu.org; Sun, 16 Dec 2018 14:59:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gYcPI-0004xs-7t for guile-user@gnu.org; Sun, 16 Dec 2018 14:48:59 -0500 Original-Received: from mx1.riseup.net ([198.252.153.129]:48936) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gYcPH-0004x6-QX for guile-user@gnu.org; Sun, 16 Dec 2018 14:48:56 -0500 Original-Received: from piha.riseup.net (piha-pn.riseup.net [10.0.1.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 56D551A3ACC for ; Sun, 16 Dec 2018 11:48:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1544989734; bh=8M0AvQXElfUGNQZ0KC+avpFmLDKJpQyRKseK9yEBosM=; h=Date:From:To:Subject:From; b=aAbHFxjDnv3W+dhUcn8NY0dlGOzMOV1NPWplhY8zI9YTWiZTIO/0R/ZGLOvL9CScw yyoqZ2NlP3pjeuU4l49yO2VRZMU2Qyiea6csnc4wVIgUKNc2eArNW7Iyst9XAPB6em zeM4Nc505meTMmmZpV6tCbqzifRkzX3vPbF58e90= X-Riseup-User-ID: EC598879DCEFE560C5BC9FD2BF4F081D0D88B7BFBE3FFDD5EF8F9E755103F14C Original-Received: from [127.0.0.1] (localhost [127.0.0.1]) by piha.riseup.net with ESMTPSA id 0AF986B4B2 for ; Sun, 16 Dec 2018 11:48:46 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 198.252.153.129 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15101 Archived-At: --=_1b98ee377c7f418a840f797475c62ca4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I'm trying hard to improve the npm-explorer[1] with a semver-parser. I get this error when testing in the REPL: sdb@antelope ~/src/guile-npm-explorer$ guile -s npm-explorer.scm >test.dot ;;; note: source file /home/sdb/src/guile-npm-explorer/npm-explorer.scm ;;; newer than compiled /home/sdb/.cache/guile/ccache/2.2-LE-4-3.A/home/sdb/src/guile-npm-explore= r/npm-explorer.scm.go ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=3D0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /home/sdb/src/guile-npm-explorer/npm-explorer.scm ;;; compiled /home/sdb/.cache/guile/ccache/2.2-LE-4-3.A/home/sdb/src/guile-npm-explore= r/npm-explorer.scm.go Backtrace: 7 (apply-smob/1 #) In ice-9/boot-9.scm: 705:2 6 (call-with-prompt _ _ #) In ice-9/eval.scm: 619:8 5 (_ #(#(#))) In ice-9/boot-9.scm: 2312:4 4 (save-module-excursion _) 3831:12 3 (_) In /home/sdb/src/guile-npm-explorer/npm-explorer.scm: 345:29 2 (generate-dot "mocha" () 0 _) 199:8 1 (choose-version # #) In unknown file: 0 (string-prefix? "*" # # =E2= =80=A6) ERROR: In procedure string-prefix?: In procedure string-prefix?: Wrong type argument in position 2 (expecting string): # The offending lambda is this one: (define (parse-semver hashtable version) "return the newest version within the same major or minor version" (define (split list) (string-split list #\.)) (define (version-list hashtable) (map split (map first (hash-table->alist (hash-ref hashtable "versions"))))) (define (major list) (first list)) (define (minor list) (second list)) (define (minor->number list) (string->number (minor (split list)))) ;; Return latest minor with same major version. =20 =20 =20 =20 ;; e.g. ^1.1.0 -> 1.4.0 even though 2.0.0 is availiable =20 =20 =20 =20 (let* ((version (split (string-drop version 1))) (version-list (map first (hash-table->alist (hash-ref hashtable "versions")))) (same-major (if (equal? 3 (length version)) (fold ;; recurse through version-list =20 =20 =20 =20 (lambda (ver lst) (if (string-prefix? (major version) ver) (cons ver lst) lst)) '() version-list) ;; not a version triplet =20 =20 =20 =20 #f))) ... (se the rest of the sexp in the file attached. Any ideas whats wrong? I'm still new to lambdas. --=20 Cheers=20 Swedebugia [1] https://gitlab.com/swedebugia/guile-npm-explorer/blob/master/npm-explorer= .scm --=_1b98ee377c7f418a840f797475c62ca4 Content-Transfer-Encoding: base64 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