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

Can common lisp do THIS?

Name: Anonymous 2018-01-10 13:47

(define-syntax toaster
(lambda (stx)
(syntax-case stx ()
[(_ x) #'"toasted something"]
[(_) #'"toasted nothing"]
[_ #'"this is a toaster"])))

(display toaster)
(newline)
(display (toaster))
(newline)
(display (toaster a))
(newline)


Scheme wins again.

Name: Anonymous 2018-01-14 8:01

Symta can, but (display toaster) requires defining toaster through mexlet, which, just like symbol-macrolet in Common Lisp, defines local syntatic constant:
toaster @Xs = case Xs
[_ X] | 'toasted something'
[_] | 'toasted nothing'

export \toaster
...

mexlet toaster 'this is a toaster'
| say toaster
| say: toaster
| say: toaster a

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