Sha256: 8118d6687c79026b349d64c833928ebc9b4b6d30747c134be7daec97c5e32d6e

Contents?: true

Size: 304 Bytes

Versions: 31

Compression:

Stored size: 304 Bytes

Contents

(assign foo (hash))
(def foo.bar (a b) (* a b))
(def foo.zeb (a b) (* a (foo.bar a b)))

(examples-for def
  ("can assign a function to a hash key"
   (foo.bar 3 4)
   12)

  ("sets hash keys"
   (hash-keys foo)
   (bar zeb))

  ("hash defs are accessible wherever the hash is"
   (foo.zeb 5 7)
   175))

Version data entries

31 entries across 31 versions & 1 rubygems

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