Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
23
Task/Inverted-syntax/EchoLisp/inverted-syntax.echolisp
Normal file
23
Task/Inverted-syntax/EchoLisp/inverted-syntax.echolisp
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
;; use reader macros to transform (a OP b) into (OP b a)
|
||||
|
||||
(lib 'match)
|
||||
(define-macro invert-= (a <- b) (set! b a))
|
||||
(define-macro invert-IF (a 'IF b) (when b a))
|
||||
|
||||
(define raining #f)
|
||||
|
||||
(#t <- raining)
|
||||
raining
|
||||
→ #t
|
||||
('umbrella-need IF raining)
|
||||
→ umbrella-need
|
||||
|
||||
(#f <- raining)
|
||||
('umbrella-need IF raining)
|
||||
→ #f
|
||||
|
||||
;; debug mode
|
||||
(debug 3)
|
||||
('umbrella-need IF raining)
|
||||
💡 [0] invert-IF → ('umbrella-need IF raining)
|
||||
compiled :: (#when raining 'umbrella-need)
|
||||
Loading…
Add table
Add a link
Reference in a new issue