wk 6: laziness and infinite structures

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:31 PM on 4/17/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

14 Terms

1
New cards

what does it mean when haskell is lazy

nothing is computed until its value is actually required

2
New cards

inn inifite lists, how much of it exists

only as much as we ask for it

3
New cards

can you extract finite portions form infinite lists

yes

4
New cards

what does drop 0 do to our list

nothing

5
New cards

what does drop - number do to our list

no effect

6
New cards

what does dropping n on an empty list do to our list

nothing

7
New cards

in drop can we ignore a set of data without needing to generate or evaluate it

yes

8
New cards

what allows us to treat infinite structures as if they were random access for finite windows

take and drop

9
New cards

zipwith

combines two sequences by applying the same operation to corresponding elements

10
New cards

can you zipwith infinite lists with finite lists if yes why

yes you can because zipwith ends as soon as the shorter input ends

11
New cards

how does laziness affect self-reference

normally, self-reference creates infinite recursion but laziness prevents this by only unfolding as much as needed

12
New cards
13
New cards
14
New cards