~rhcarvalho/+junk/racket

1
2
3
4
5
6
7
#lang racket

(define cust (make-custodian))
(custodian-limit-memory cust (* 20 1024 1024)) ;; limit memory usage to 20MB
(parameterize ([current-custodian cust])
  (let loop ([lst '()])
    (loop (cons (random 2) lst))))