Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Macro-writing challenge

Name: Anonymous 2016-01-16 13:19

Write a macro check-arguments-non-nil to be used in function definitions, that would expand to assertion about every argument being non-nil.
The intended usage of this macro:

(defun foo (a b c d)
(check-arguments-non-nil)
foo-body)


This should expand to:

(defun foo (a b c d)
(assert (and (not (null a)) (not (null b)) (not (null c)) (not (null d)))
(a b c d)
"Null argument in FOO")
foo-body)


The macro must work whatever the number and names of the function parameters.

Name: Anonymous 2016-01-23 11:48

y, e, s, c, o, m, m, a, s, l, i, k, e, i, n, C, a, r, e, w, a, y, b, e, t, t, e, r, a, n, d, d, o, n, t, a, d, d, a, n, y, t, h, i, n, g, v, i, s, u, a, l, l, y, s, o, t, h, e, y, d, o, n, t, d, i, s, r, u, p, t, r, e, a, d, i, n, g, a, t, a, l, l, a, n, d, e, v, e, r, y, b, o, d, y, a, l, r, e, a, d, y, u, s, e, s, s, p, a, c, e, s, w, i, t, h, t, h, e, m, s, o, i, t, a, l, l, w, o, r, k, s, o, u, t, i, n, t, h, e, e, n, d, r, i, g, h, t;

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List