楼主: ReneeBK
764 2

[Lecture Notes]Programming Methodology [推广有奖]

  • 1关注
  • 62粉丝

VIP

已卖:4897份资源

学术权威

14%

还不是VIP/贵宾

-

TA的文库  其他...

R资源总汇

Panel Data Analysis

Experimental Design

威望
1
论坛币
49635 个
通用积分
55.6937
学术水平
370 点
热心指数
273 点
信用等级
335 点
经验
57805 点
帖子
4005
精华
21
在线时间
582 小时
注册时间
2005-5-8
最后登录
2023-11-26

楼主
ReneeBK 发表于 2016-8-20 02:04:40 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
DateNotes
Tuesday, Jan 19No class.
Wednesday, Jan 20No lab.
Thursday, Jan 21Out: HW1. Lecture  Notes.
Tuesday, Jan 26Lecture Notes.
Wednesday, Jan 27Lab: Help session for Homework 1.
Thursday, Jan 28Due: HW1. Out: HW2. Lecture  Notes.
Tuesday, Feb 2Lecture Notes.
Wednesday, Feb 3Lab: Distributed during lab.
Thursday, Feb 4Lecture  Notes. Due: HW2. Out: HW3.
Tuesday, Feb 9
Wednesday, Feb 10Lab: Distributed during lab.
Thursday, Feb 11Due: HW3. Out: HW4. Lecture  Notes
Tuesday, Feb 16No class. (Monday schedule)
Wednesday, Feb 17Lab:
Thursday, Feb 18Out: HW5. Lecture  Notes
Tuesday, Feb 23Due: HW4. Lecture  Notes
Wednesday, Feb 24Lab: Steps 1 and 2 of HW5
Thursday, Feb 25Lecture Notes
Tuesday, Mar 1Due: HW5. Out: HW6. Lecture  Notes
Wednesday, Mar 2Lab: Steps 1 and 2(a) of HW6.
Thursday, Mar 3Lecture Notes
Tuesday, Mar 8Due: HW6. Lecture  Notes.
Wednesday, Mar 9No Lab. (No assignment due.)
Thursday, Mar 10Lecture Notes
Tuesday, Mar 15No class. (Spring Recess)
Wednesday, Mar 16No lab. (Spring Recess)
Thursday, Mar 17No class. (Spring Recess)
Tuesday, Mar 22Out: HW7. Lecture  Notes
Wednesday, Mar 23Lab: Step 1 of HW7.
Thursday, Mar 24
Tuesday, Mar 29Reading: Enumerating the Rationals (in Scala)
Wednesday, Mar 30No lab. (Continue working on Sudoku.)
Thursday, Mar 31Reading: Java Regular Expressions and Scala Regular Expressions
Tuesday, Apr 5Due: HW7. Out: HW8.
Wednesday, Apr 6Lab: Steps 1 and 2 of HW8.
Thursday, Apr 7Code from class
Tuesday, Apr 12Due: HW8. Out: HW9. Reading: Chapter 33 of  Programming in Scala.
Wednesday, Apr 13Lab: Tasks 2 and 5 of HW9.
Thursday, Apr 14
Tuesday, Apr 19Due: HW9. Out: HW10.
Wednesday, Apr 20No lab. (Monday schedule.)
Thursday, Apr 21
Tuesday, Apr 26Due: HW10.

https://people.cs.umass.edu/~arjun/courses/cmpsci220-spring2016/schedule/
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Methodology Programming methodolog Lecture Program schedule during

沙发
ReneeBK 发表于 2016-8-20 02:06:07
  1. 2.2 The Filter Function
  2. Another common pattern when programming with lists is to select certain elements that
  3. have some property. For example, here is a function that consumes a list, and produces a
  4. new list that only contains the even numbers:
  5. def filterEven ( lst : List [ Int ]): List [ Int ] = lst match {
  6. case Nil => Nil
  7. case head :: tail =>
  8. ( head % 2 == 0) match {
  9. case true => head :: filterEven ( tail )
  10. case false => filterEven ( tail )
  11. }
  12. }
  13. This is a very common pattern too. For example, we could write a function to select the
  14. odd numbers or the prime numbers. If we had a list of strings, we could select all the strings
  15. with length 5 or all the strings that represent English-language words. All these functions
  16. have the same shape: they test the value of head in some way. If the test succeeds, head is
  17. added in the output list. But, if the test fails, it is excluded.
  18. Following the same strategy we used to derive map, we first package the head-test into a
  19. function:
  20. def f(n: Int ): Boolean = head % 2
  21. def filterEven ( lst : List [ Int ]): List [ Int ] = lst match {
  22. case Nil => Nil
  23. case head :: tail =>
  24. f( head ) match {
  25. case true => head :: filterEven ( tail )
  26. case false => filterEven ( tail )
复制代码

藤椅
h2h2 发表于 2016-8-20 03:12:46
谢谢分享

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-31 20:45