... | ... | @@ -2,10 +2,14 @@ I'll use this to list some of the stuff I've done with pikey. |
|
|
|
|
|
First off, a couple of simple macros.
|
|
|
|
|
|
Probably one of the most useful so far that I've found.
|
|
|
|
|
|
``` common-lisp
|
|
|
(defmacro+ps -> (&rest body)
|
|
|
`(chain ,@body))
|
|
|
(defmacro+ps -> (name function &rest args)
|
|
|
`((@ ,name ,function) ,@args))
|
|
|
```
|
|
|
|
|
|
(defmacro+ps _ (function &rest body)
|
|
|
`(-> _ (,function ,@body)))
|
|
|
``` common-lisp
|
|
|
(-> console log "Honk") ;; console.log("Honk");
|
|
|
(-> console die) ;; console.die();
|
|
|
``` |
|
|
\ No newline at end of file |