feat: swap macro
This commit is contained in:
parent
07c01a1e39
commit
5f7f7e4aed
1 changed files with 7 additions and 0 deletions
7
mute-interpreter/src/env/standard.rs
vendored
7
mute-interpreter/src/env/standard.rs
vendored
|
@ -19,6 +19,13 @@ pub(super) fn standard() -> HashMap<String, Value> {
|
|||
(macro* (name args body) ~(define (,name (fn* ,args ,body))) )
|
||||
},
|
||||
),
|
||||
(
|
||||
"swap",
|
||||
inline! {
|
||||
(macro* (a b) ~(define (,a ,b) (,b ,a)))
|
||||
},
|
||||
),
|
||||
// Quoting
|
||||
(
|
||||
"quote",
|
||||
inline! {
|
||||
|
|
Loading…
Reference in a new issue