Sha256: 9fc36448f7bb71107dba53193f9da738d0c8f11c7e2d3cd0c46acd77aff42929

Contents?: true

Size: 458 Bytes

Versions: 396

Compression:

Stored size: 458 Bytes

Contents

(defpackage #:etl
  (:use #:common-lisp)
  (:export #:transform))

(in-package #:etl)

(defun transform (data)
  (let ((old-kvs (loop
		for k being each hash-keys in data
		for v being each hash-values in data
		collecting (list k v))))
    (reduce
     #'(lambda (h kv)
	 (loop
	    for v in (second kv)
	    with k = (first kv)
	    do (setf (gethash v h) k)
	    finally (return h)))
     old-kvs
     :initial-value (make-hash-table :test 'equalp)))
  )

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.179 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.178 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.177 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.176 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.175 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.174 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.173 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.172 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.171 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.170 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.169 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.167 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.166 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.165 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.164 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.163 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.162 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.161 tracks/common-lisp/exercises/etl/example.lisp
trackler-2.2.1.160 tracks/common-lisp/exercises/etl/example.lisp