Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ret

  • Loading branch information...
commit ed740068052ba418fc133c93f7b07d289fe7ecd6 1 parent d4bd394
@awwx authored
Showing with 17 additions and 0 deletions.
  1. +3 −0  readme.md
  2. +4 −0 ret.arc
  3. +10 −0 ret.t
View
3  readme.md
@@ -700,3 +700,6 @@ Pauan
* made functions and macros print as #<fn> and #<mac>.
* tests for extend and defrule.
+
+ret comes from Sean Kenney's kwizwiz.arc:
+https://github.com/skenney26/kwizwiz/blob/ac0547e7d090690bec3a8a5d06fb1cfcf6484b82/kwizwiz.arc#L22
View
4 ret.arc
@@ -0,0 +1,4 @@
+(use arc)
+
+(mac ret (var val . body)
+ `(let ,var ,val ,@body ,var))
View
10 ret.t
@@ -0,0 +1,10 @@
+(use test-by-example)
+
+(example-test (runtime '(ret)) #<<.
+
+> (ret x 33
+ (++ x))
+34
+
+.
+)
Please sign in to comment.
Something went wrong with that request. Please try again.