3 ms·
To expand on this a little, here is a thing that you can't translate to most programming languages. By defining a simple, pattern-based macro we can get much cl
by klibertp 11y ago
To expand on this a little, here is a thing that you can't translate to most programming languages. By defining a simple, pattern-based macro we can get much closer to the Dart version:
(func: hello() => (displayln "Hello world"))
(hello)
All you need to do this - to change the language syntax to look like that - is to write this:
(define-syntax func:
(syntax-rules (=>)
[(_ name (formal ...) => expr ...)
(define name (lambda (formal ...) expr ...))]))