1/13
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
what does it mean when haskell is lazy
nothing is computed until its value is actually required
inn inifite lists, how much of it exists
only as much as we ask for it
can you extract finite portions form infinite lists
yes
what does drop 0 do to our list
nothing
what does drop - number do to our list
no effect
what does dropping n on an empty list do to our list
nothing
in drop can we ignore a set of data without needing to generate or evaluate it
yes
what allows us to treat infinite structures as if they were random access for finite windows
take and drop
zipwith
combines two sequences by applying the same operation to corresponding elements
can you zipwith infinite lists with finite lists if yes why
yes you can because zipwith ends as soon as the shorter input ends
how does laziness affect self-reference
normally, self-reference creates infinite recursion but laziness prevents this by only unfolding as much as needed