• Skip to main content
  • Skip to footer

PurelyFunctional.tv

  • Learn Clojure
  • About
  • ๐Ÿ›’ Cart
  • Log in
Download
 Video time: 03m25s
PREVIOUS
NEXT

Want this course?

Buy for $75
Membership

Gotcha: Effects and chunking

Course: Lazy Sequences

Updated October 25, 2019

Description
Notes

This lesson teaches the care needed when mixing effects and laziness, as well as what chunking is. This lesson includes a video screencast with slides and exercises. The video is 5 minutes long, and the exercises might take 10 minutes.

The time has come to talk about chunking. And about effects! These are two gotchas in the lazy sequence world that you should know up front, before itโ€™s too late!

Exercise

What happens if the chunk size is 1? What happens if the chunk size is infinity?

Exercise

Devise experiments to determine the chunk size of the following data structures:

  • vector
  • numeric range (using range function)
  • iteration (using iterate function)
  • repetition (using repeat function)
  • list (using list function)

Next Lesson

3 min

Gotcha: *print-length*

How to use print-length to avoid printing very long lists. This lesson includes a video screencast and an exercise. The video is 3 minutes long.

Course: Lazy Sequences

0 / 6
0 / 6
 
Lessons
 
What are lazy sequences?
free  
5 min 
 
Gotcha: Effects and chunking
free  
3 min 
 
Gotcha: *print-length*
 
3 min 
 
Gotcha: holding onto the head
 
7 min 
 
Gotcha: length checks
 
4 min 
 
The Benefits of Laziness
 
11 min 

Footer CTA

Level up your Clojure skills

The PurelyFunctional.tv Newsletter is a weekly email that helps you improve your Clojure skills through challenges, tips, and news.

Enter your email address to receive emails about Clojure and Functional Programming. These include the weekly newsletter and occasional offers. You can unsubscribe any time.

Copyright © 2021 LispCast and Eric Normand