ppt课件-introductiontocomputingandprogramminginpythona.pptVIP

  • 4
  • 0
  • 约3.09万字
  • 约 87页
  • 2017-01-22 发布于四川
  • 举报

ppt课件-introductiontocomputingandprogramminginpythona.ppt

ppt课件-introductiontocomputingandprogramminginpythona

* It’s now just a one line program What we want to do is filter out pixels that match checkPixel, then map the function turnRed to that result. map(turnRed, filter(checkPixel,getPixels(pic))) Really using the one-liner pic=makePicture( getMediaPath(barbara.jpg)) map(turnRed, filter(checkPixel, getPixels(pic))) Exercise for the Interested Student: Rewrite this function with just lambda’s! Then it really is just a single line of code! A new way of thinking In functional programming, you don’t write functions with big loops that process all the data. Instead, you write small functions tha

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档