We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 03cc918 commit e1f2c91Copy full SHA for e1f2c91
snippets/racket/2022-01-21.rkt
@@ -0,0 +1,18 @@
1
+#lang racket
2
+
3
+(define-syntax block
4
+ (syntax-rules (then where <-)
5
+ ((_ (case1 ...)
6
+ then (case2 ...)
7
+ where (v <- a b) ...)
8
+ (begin
9
+ ((let ((v a) ...) case1 ...)
10
+ (let ((v b) ...) case2 ...))))))
11
12
+(block
13
+ ((displayln (* x y)))
14
+ then
15
+ ((displayln (+ x y)))
16
+ where
17
+ (x <- 2 0)
18
+ (y <- 3 2))
snippets/racket/2022-06-16.rkt
@@ -0,0 +1,5 @@
+(define list-to-compose (lst)
+ (foldr (lambda (x y) (list x y)) '() lst))
0 commit comments