Question: I assume natsplusbyfives is using my scale function. here is my code for reference: let odds = let generate _ odd n = makeStream n
I assume natsplusbyfives is using my scale function. here is my code for reference:
let odds
let generateodd n makeStream n n fun this state this state state in
generateodd ;;
let rec trim count stream
match count with
stream
trim count rest stream ;;
let scale factor stream
let newFirst first stream factor in
let newRest rest stream in
makeStream newFirst newRest fun this state
let nextFirst first state factor in
let nextRest rest state in
nextFirst nextRest
let sum left right
let newFirst first left first right in
let newRest rest left rest right in
makeStream newFirst newRest fun this state
let nextFirst first fst state first snd state in
let nextRest rest fst state rest snd state in
nextFirst nextRest;;
Any ideas? I also didn't get any points for the other functions so is there a reason why none of them are working?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
