Commits

Anonymous committed c8c4fc2

Implement lazy-ref

  • Participants
  • Parent commits e73d353

Comments (0)

Files changed (2)

  lazy-null lazy-null?
  lazy-seq->list list->lazy-seq
  lazy-head lazy-tail
- lazy-take lazy-drop
+ lazy-take lazy-drop lazy-ref
  lazy-map lazy-filter
  lazy-numbers)
 
                        (lazy-filter pred? (lazy-tail seq))))
                 (else (loop (lazy-tail seq))))))))
 
+(define (lazy-ref n seq)
+  (lazy-head (lazy-drop n seq)))
+
 )
                        (lazy-numbers start: 2 step: 3))))))
 
 
+(test-group "lazy-ref"
+  (test 3 (lazy-ref 3 (lazy-numbers))))
+
 (test-exit)