mirror of
https://github.com/carp-lang/Carp.git
synced 2024-10-05 17:47:30 +03:00
docs: fix typo in make-deriver and add implementor note (#1155)
This commit is contained in:
parent
8e1e827e57
commit
881e904ae9
@ -1,3 +1,8 @@
|
||||
; Implementors’ note: this code could be made more elegant by using quasiquotes
|
||||
; but quasiquoting is actually loaded after this module, so we can’t rely on
|
||||
; that functionality.
|
||||
|
||||
|
||||
(doc Derive "is a mechanism for deriving interfaces automatically.
|
||||
|
||||
Please reference [the documentation](https://github.com/carp-lang/Carp/blob/master/docs/Derive.md)
|
||||
@ -15,7 +20,7 @@ Example:
|
||||
(make-deriver 'zero []
|
||||
(fn [t]
|
||||
(cons 'init
|
||||
(map (fn [_] '(zero)) (members t)))))
|
||||
(map (fn [_] '(zero)) (eval `(members %t)))))
|
||||
```")
|
||||
(defndynamic make-deriver [f args body]
|
||||
(set! Derive.derivers
|
||||
|
Loading…
Reference in New Issue
Block a user