Sha256: 8d8a51cec58cc202813bdfbe8b9a67ce6e54e0e9c7d767d14d3b17c5ac6a6bb9

Contents?: true

Size: 380 Bytes

Versions: 22

Compression:

Stored size: 380 Bytes

Contents

(examples-for group-by
  ("create a hash keyed by value of given function"
   (let h (group-by car
                    (list '(a b c) '(a x y) '(b c d) '(z y x) '(z b a) '(1 2 3)))
     (joinstr ", "
              (map λk(j k " -> " (inspect:hash-get h k))
                   (hash-keys h))))
   "a -> ((a x y) (a b c)), b -> ((b c d)), z -> ((z b a) (z y x)), 1 -> ((1 2 3))"))

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
nydp-0.6.0 lib/lisp/tests/group-by-examples.nydp
nydp-0.5.1 lib/lisp/tests/group-by-examples.nydp
nydp-0.5.0 lib/lisp/tests/group-by-examples.nydp
nydp-0.4.6 lib/lisp/tests/group-by-examples.nydp
nydp-0.4.5 lib/lisp/tests/group-by-examples.nydp
nydp-0.4.3 lib/lisp/tests/group-by-examples.nydp
nydp-0.4.2 lib/lisp/tests/group-by-examples.nydp
nydp-0.4.1 lib/lisp/tests/group-by-examples.nydp
nydp-0.4.0 lib/lisp/tests/group-by-examples.nydp
nydp-0.3.0 lib/lisp/tests/group-by-examples.nydp
nydp-0.2.6 lib/lisp/tests/group-by-examples.nydp
nydp-0.2.5 lib/lisp/tests/group-by-examples.nydp
nydp-0.2.3 lib/lisp/tests/group-by-examples.nydp
nydp-0.2.2 lib/lisp/tests/group-by-examples.nydp
nydp-0.2.1 lib/lisp/tests/group-by-examples.nydp
nydp-0.2.0 lib/lisp/tests/group-by-examples.nydp
nydp-0.1.15 lib/lisp/tests/group-by-examples.nydp
nydp-0.1.14 lib/lisp/tests/group-by-examples.nydp
nydp-0.1.13.2 lib/lisp/tests/group-by-examples.nydp
nydp-0.1.13.1 lib/lisp/tests/group-by-examples.nydp