Last active
July 9, 2017 02:19
-
-
Save kunigami/9b730bf3f0fc81d0b3c93290506164db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Incorrect Stream.insert() version *) | |
let newFront = rotate { | |
front = rest_front; | |
rear = rest_rear; | |
schedule = newSchedule | |
} in | |
Stream.insert first_elem newFront (* ==> lazy StreamCell (first_elem, newFront) *) | |
(* Correct version *) | |
lazy ( | |
let newFront = rotate { | |
front = rest_front; | |
rear = rest_rear; | |
schedule = newSchedule | |
} in | |
StreamCell (first_elem, newFront) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment