Sha256: b1646fa96172ebf5f37584f286bb50de70226ece9998b44c55a30fb3d5e7ab75

Contents?: true

Size: 460 Bytes

Versions: 6

Compression:

Stored size: 460 Bytes

Contents

(examples-for map-hash
  ("iterates over key-value pairs"
   (map-hash (fn (k v i) "pos.~i : ~k is for ~v")
             { a 42 b 729 c 1024 })
   ("pos.0 : a is for 42" "pos.1 : b is for 729" "pos.2 : c is for 1024"))

  ("sorts keys before iterating"
   (map-hash (fn (k v i) "pos.~i : ~k is for ~v")
             { "aa" 1 "bbb" 2 "c" 3 }
             (fn (keys) (sort-by len keys)))
   ("pos.0 : c is for 3" "pos.1 : aa is for 1" "pos.2 : bbb is for 2" )))

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nydp-0.6.0 lib/lisp/tests/map-hash-examples.nydp
nydp-0.5.1 lib/lisp/tests/map-hash-examples.nydp
nydp-0.5.0 lib/lisp/tests/map-hash-examples.nydp
nydp-0.4.6 lib/lisp/tests/map-hash-examples.nydp
nydp-0.4.5 lib/lisp/tests/map-hash-examples.nydp
nydp-0.4.3 lib/lisp/tests/map-hash-examples.nydp