Sha256: 938e74c4ba1618d2e24cf2d60c086908ad0accd85cdb93fa41999e7937a322fc

Contents?: true

Size: 676 Bytes

Versions: 3

Compression:

Stored size: 676 Bytes

Contents

(examples-for colon-syntax
  ("expands to sequential function application"
   (pre-compile 'a:b)
   (fn args (a (apply b args))))

  ("example with car:cdr"
   (car:cdr '(a b c))
   b)

  ("dislikes no-prefix"
   (on-err (joinstr "\n" errors)
           (pre-compile '(:foo 1 2 3)))
   "\"Irregular ': syntax: got (|| foo) : not prefix-syntax : in :foo\""))

(examples-for prefix-list
  ("one argument"
   (map λa(len a.name)
        (list { name "bob" } { name "willy" } { name "pteradactyl" }))
   (3 5 11))

  ("with two args"
   (reduce λxy(joinstr ":" x y)
           '(a b c d e f))
   "a:b:c:d:e:f")

  ("with two args, to be sure"
   (λpq(+ p (* p q)) 3 5)
   18))

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nydp-0.3.0 lib/lisp/tests/syntax-tests.nydp
nydp-0.2.6 lib/lisp/tests/syntax-tests.nydp
nydp-0.2.5 lib/lisp/tests/syntax-tests.nydp