正在加载图片...
6.001 Structure and Interpretation of Computer Programs. Copyright o 2004 by Massachusetts Institute of Technology Slide 17.5.40 Integration as an example If we ask add-streams to evaluate its next element. it define (integral integrand init at) will take the next element of the input(ones), scale it, and add it to the latest value of the output stream, and return that together with another promise for the next stage of the computation nt))) ntegral。ne02 68 4 Slide 17.5.41 Key points are: having this idea of lazy evaluation supports theIntegration as an example (define (integral integrand init dt) creation of structures that provide promises to create additional elements in a sequence when needed; and that those structures allow us conceptualize processes as if the entire sequence was (add-streams (stream-scale dt integrand) available, focusing on the processing to be executed on the sequence, but have the actual evaluation occur just as needed n七egra1。ne026.001 Structure and Interpretation of Computer Programs. Copyright © 2004 by Massachusetts Institute of Technology. Slide 17.5.40 If we ask add-streams to evaluate its next element, it will take the next element of the input (ones), scale it, and add it to the latest value of the output stream, and return that together with another promise for the next stage of the computation. Slide 17.5.41 Key points are: having this idea of lazy evaluation supports the creation of structures that provide promises to create additional elements in a sequence when needed; and that those structures allow us conceptualize processes as if the entire sequence was available, focusing on the processing to be executed on the sequence, but have the actual evaluation occur just as needed
<<向上翻页
©2008-现在 cucdc.com 高等教育资讯网 版权所有