From 0f072be231d0bd875d1c87ff127834e60979263a Mon Sep 17 00:00:00 2001
From: rsiddharth <s@ricketyspace.net>
Date: Fri, 3 Jul 2020 15:47:02 -0400
Subject: net/ricketyspace/ror -> ./

---
 eleven/lazy.rkt | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 eleven/lazy.rkt

(limited to 'eleven')

diff --git a/eleven/lazy.rkt b/eleven/lazy.rkt
new file mode 100644
index 0000000..6f54719
--- /dev/null
+++ b/eleven/lazy.rkt
@@ -0,0 +1,23 @@
+#lang racket
+
+(define (make-lazy+ i)
+  (lambda ()
+    (apply + (build-list (* 500 i) values))))
+
+
+(define long-big-list (build-list 5000 make-lazy+))
+
+
+(define (compute-every-1000th l)
+  (for/list ([thunk l]
+             [i (in-naturals)]
+             #:when (zero? (remainder i 1000)))
+    (thunk)))
+
+
+(define (memoize.v2 suspended-c)
+  (define (hidden)
+    (define the-value (suspended-c))
+    (set! hidden (lambda () the-value))
+    the-value)
+  (lambda () (hidden)))
-- 
cgit v1.2.3