summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2022-01-16 12:32:40 +0530
committerArun Isaac2022-01-16 12:32:40 +0530
commit647f020ccd409e83320e8d11859035856770c91f (patch)
treed1e5ae5dbdfd807a6a69ca1cb9bbbe4c2fff2fd1
parentfa583a919f270bb1ddf0c9102fa633b10d3dff10 (diff)
downloadccwl-647f020ccd409e83320e8d11859035856770c91f.tar.gz
ccwl-647f020ccd409e83320e8d11859035856770c91f.tar.lz
ccwl-647f020ccd409e83320e8d11859035856770c91f.zip
ccwl: Delete plist->alist.
plist->alist is not used anywhere. pairify is quite sufficient to take
on its functionality.

* ccwl/utils.scm (plist->alist): Delete function.
* tests/utils.scm ("plist->alist"): Delete test.
-rw-r--r--ccwl/utils.scm12
-rw-r--r--tests/utils.scm4
2 files changed, 0 insertions, 16 deletions
diff --git a/ccwl/utils.scm b/ccwl/utils.scm
index 04938b1..508e884 100644
--- a/ccwl/utils.scm
+++ b/ccwl/utils.scm
@@ -58,18 +58,6 @@
      (cons (cons first second)
            (pairify tail)))))
 
-(define (plist->alist plist)
-  "Convert the property list PLIST to an association list. A property
-list is a list of the form (#:key1 value1 #:key2 value2 ...). For
-example,
-
-(plist->alist (list #:spam 1 #:ham 2 #:eggs 3))
-=> ((spam . 1) (ham . 2) (eggs . 3))"
-  (map (match-lambda
-         ((key . value)
-          (cons (keyword->symbol key) value)))
-       (pairify plist)))
-
 (define* (group-keyword-arguments args #:optional (unary-keywords (list)))
   "Group ARGS, a list of keyword arguments of arbitrary arity. Return
 a list of unary keyword arguments. n-ary arguments are grouped
diff --git a/tests/utils.scm b/tests/utils.scm
index 3970a5c..b630b10 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -33,10 +33,6 @@
   '((1 . 2) (3 . 4) (5 . 6))
   (pairify (list 1 2 3 4 5 6)))
 
-(test-equal "plist->alist"
-  '((spam . 1) (ham . 2) (eggs . 3))
-  (plist->alist (list #:spam 1 #:ham 2 #:eggs 3)))
-
 (test-equal "plist-ref"
   2
   (plist-ref (list #:spam 1 #:ham 2 #:eggs 3)